1.清空字典中元素清空,dict变为{} L.clear()-> None. Remove all items from L 1 2 3 4 >>> L ={'shaw':23,'sam':36,"eric":40} >>> L.clear() >>> print L {} 2. 返回一个字典的浅复制 L.copy()-> a shallow copy of L 1 2 3 >>> L ={'shaw…
python简单方法判断三个数能否组成三角形 #encoding=utf-8 import math while True: str=raw_input("please input three numbers a,b,c:('stop' to exit)") print "####",str,type(str) if str !="stop": x,y,z = eval(str) min_value=min(x,y,z) max_value=ma…