摘要:
print(abs(3.131415926)) print(all([-5])) #如果迭代的所有元素都为真(或者迭代是空的),则返回True Equivalent to: print(any([0])) #如果迭代的任何元素都为真,则返回True。如果iterable是空的,返回False Equivalent to: a = ascii([1,2,"丫丫个呸"]) #所内存的数据对象打印出... 阅读全文
摘要:
定义字典 dic = {'a':"hello",'b':"how",'c':"you"}方法一:for key in dic: print key,dic[key] print key + str(dic[key])结果: a hello ahello c you cyou b how bhow细节 阅读全文