标签:start 转换 eth ofo name 绝对值 print UNC ati
https://www.runoob.com/python/python-built-in-functions.htmlprint(abs(-5))
print(divmod(7,2))
f=open(r‘D:\2018\001.txt‘,‘r‘,encoding=‘utf-8‘)
print(f.read())
print(all([‘a‘,‘b‘,‘c‘]))
print(all([‘a‘,‘b‘,‘c‘,‘‘]))
print(all([‘a‘,‘b‘,‘c‘,0]))
print(all([‘a‘,‘b‘,‘c‘,False]))
print(all(())) #空元组
seasons=(‘Spring‘,‘Summer‘,‘Fall‘,‘Winter‘)
print(list(enumerate(seasons)))
print(list(enumerate(seasons,start=10))) #下标从10开始
for i,element in enumerate(seasons):
print(i,element)
print(int(‘2‘))
print(int(3.7))
print(ord(‘a‘))
dict={‘username‘:‘tom‘,‘age‘:28,‘hobby‘:‘篮球‘}
print(dict)
print(str(dict))
标签:start 转换 eth ofo name 绝对值 print UNC ati
原文地址:http://blog.51cto.com/6000734/2308690