摘要:
with open('data1_1.txt', 'r', encoding = 'utf-8') as f: data = f.readlines() n = 0 for line in data: if line.strip('\n') == '': continue n += 1 print( 阅读全文
摘要:
x = list(range(10)) print('整数输出1:',end='') for i in x: print(i,end=' ') print('\n整数输出2:',end='') for i in x: print(f'{i:02d}',end='-') print('\n整数输出3: 阅读全文
摘要:
print('hey, u') print('hey', ' u') x = 1 y = 2 z = 3 print(x, y, z) print('x = %d, y = %d, z = %d' %(x,y,z)) # 方法1 print('x = {}, y = {}, z = {}'.form 阅读全文