import sys,random
import getpass#读取包
line_no=0
with open(filename,'r',encoding='utf8') as f:
for line in f:
line_no+=1
import getpass#读取包
filename = sys.argv[0
#获取本文件夹的名称
f=open(filename,'r',encoding='utf8')line_no=0
with open(filename,'r',encoding='utf8') as f:
for line in f:
line_no+=1
print(line_no,':',line)
#打印出本文件的字符
f.close()
#关闭资源