摘要:
函数定义def hello(): # print(123) return 123print(hello())输出最大值与最小值def get_max_min(lists): max=lists[0] min=lists[0] for i in lists: if max<i: max=i if mi 阅读全文
posted @ 2021-08-23 22:08
博客老手
阅读(103)
评论(0)
推荐(0)
摘要:
元组a=(1,2,3,4,5)print(type(a))for i in a: print(i)字典无序 键名不能重复,不可以是可变元素dicts={'hello':[1,2,3],123:'nohao','s':{'ni':'hao'}}print(dicts['hello'])查print(d 阅读全文
posted @ 2021-08-23 22:07
博客老手
阅读(28)
评论(0)
推荐(0)
摘要:
购物车car=[]lists=[['水果',['梨','苹果']],['日用百货',['卫生纸','毛巾']]]flag='t'while 1: if flag=='f': print(car) break n = 0 for a,b in lists: n=n+1 print(n,a) m=0 n 阅读全文
posted @ 2021-08-23 22:06
博客老手
阅读(80)
评论(0)
推荐(0)
摘要:
if False: print(123)elif False: print(456)else: print('ajfie')a=4if a>3: print(a)if a>4: print(a)猜数字大小游戏num1 = int(input('请输入一个数:'))print(type(num1))w 阅读全文
posted @ 2021-08-23 22:05
博客老手
阅读(119)
评论(0)
推荐(0)
摘要:
int 整型str 字符串boll 布尔型float 浮点型list 列表dict 字典set 集合tuple 元组整型print (type(12))value1 = 1 + 3value2 = 1 - 3value3 = 1 * 3value4 = 1 / 3print(value1, valu 阅读全文
posted @ 2021-08-23 22:02
博客老手
阅读(78)
评论(0)
推荐(0)

浙公网安备 33010602011771号