读以数字开头的行

2024-06-01 23:13:52 发布

您现在位置:Python中文网/ 问答频道 /正文

在python中,我怎么能只读取以数字开头的行呢

Hello World <--ignore
Lovely day
blah43 
blah
1234 <--read
blah12 <--ignore
blah 
3124 <--read
Not matter how many words there are <--ignore
blah 
0832 8423984 234892304 8239048324 8023948<--read
blah132 <--ignore

Tags: helloworldreadnot数字manyhowignore