摘要: 任务1 import random print('用列表存储随机整数: ') lst = [random.randint(0, 100) for i in range(5)] print(lst) print('\n用集合存储随机整数: ') s1 = {random.randint(0, 100) 阅读全文
posted @ 2023-04-19 23:11 王响 阅读(48) 评论(0) 推荐(1) 编辑
摘要: 任务1 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-22 21:55 王响 阅读(37) 评论(0) 推荐(1) 编辑
摘要: print(x,y,z) print('x = %d,y = %d,z=%d'%(x,y,z)) print('x={},y={},z={}'.format(x,y,z)) print(f'x={x},y={y},z={z}') print(x) print(y) print(z) print(x, 阅读全文
posted @ 2023-03-09 14:33 王响 阅读(43) 评论(1) 推荐(1) 编辑