摘要: with open('data6.csv', 'r', encoding='gbk') as f: old_data = f.read().split('\n') del old_data[0] processed_data = [] for i in range(len(old_data)): i 阅读全文
posted @ 2023-06-06 23:53 废话师 阅读(14) 评论(0) 推荐(0)
摘要: import random print('用列表存储:') lst = [random.randint(0,100) for i in range(5)] print(lst) print('\n用集合') s1 = {random.randint(0,100) for i in range(5)} 阅读全文
posted @ 2023-04-25 22:29 废话师 阅读(23) 评论(0) 推荐(0)
摘要: x = 'nba FIFA' print(x.upper()) print(x.lower()) print(x.swapcase()) print() x = 'abc' print(x.center(10, '*')) print(x.ljust(10, '*')) print(x.rjust( 阅读全文
posted @ 2023-03-28 18:44 废话师 阅读(17) 评论(0) 推荐(0)
摘要: #实验任务1 print('hey, u') print('hey', ' u') x,y,z = 1,2,3 print(x, y, z) print('x = %d, y = %d, z = %d' %(x,y,z)) print('x = {}, y = {}, z = {}'.format( 阅读全文
posted @ 2023-03-13 18:59 废话师 阅读(27) 评论(1) 推荐(0)