已知ls=[x*2 for x in range(5)],则print(ls)的输出结果为____。
查看答案
____是指可以通过next函数不断获取下一个值的对象。
1.该程序用到字典的浅拷贝和深拷贝,已知程序运行结果,请将程序填写完整。import copyd1={'name':"zhangsan",'sno':"001",'score':{'math':99,'C++':88}}d2=d3=d1['name']="li"d1['score']['C++']=90print(d1)print(d2)print(d3)已知程序运行结果为:{'name': 'li', 'sno': '001', 'score': {'math': 99, 'C++': 90}}{'name': 'zhangsan', 'sno': '001', 'score': {'math': 99, 'C++': 90}}{'name': 'zhangsan', 'sno': '001', 'score': {'math': 99, 'C++': 88}}
写出下面程序的运行结果。t1=("zhangsan",18,95.5)t2=()t3=(33,)t4=([44,55,66])t5=t1+t3print(t1,t2,t3,t4,t5)print(t5)print(max(t4))print(min(t4))
写出下面程序的运行结果。ls=[1,2,3,2,3,4]print(ls.index(4))print(ls.count(3))print(max(ls))print(min(ls))print(len(ls))del ls[3]print(ls)ls.sort(reverse=True)print(ls)