python3_统计多少行
list_preferred_net = [] filename = r"E:\AUTO_test\testfile.txt" myfile = open(filename,encoding = "utf-8") lines = myfile.readlines() print("There are %d lines in %s" %(len(lines), filename))
list_preferred_net = [] filename = r"E:\AUTO_test\testfile.txt" myfile = open(filename,encoding = "utf-8") lines = myfile.readlines() print("There are %d lines in %s" %(len(lines), filename))