Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa35aa9

Browse files
committed
getFieldNum
1 parent b93de72 commit fa35aa9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pyfile/file_read.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ def readFile(s):
1212
def getFieldNum(line):
1313
import re
1414
matches = re.findall(r'\S+', line)
15-
# 打印 a 字符出现的次数
16-
print(matches.__len__())
15+
if matches.__len__() == 17:
16+
print("成功")
17+
else:
18+
print(matches.__len__())
1719

1820

1921
if __name__ == "__main__":

0 commit comments

Comments
 (0)