内置函数

# print(pow(2,3))#2的3次方
# print(pow(2,3,3))#2的3次方%3
# p=[1,2,3,4]
# print(reversed(p))#反转
# print(list(reversed(p)))#[4,3,2,1]
# print(round(2,3))
# # print(set('hello'))
# s='jerrt'
# t=slice(3,5)#先切片打》=3,《5
# print(s[t])
# print(t.step)
# s=[2,5,7,3,77]
# print(sorted(s))#排序从小到大,比较大小
# people=[
#     {'name':23},
#     {'name':22},]
# print(sorted(people,lambda dic:dic['name']))
# print(sorted(zip(people.values,people.keys)))
# import eze#eze为另一个py文件其中包含函数say------import调用操作系统然后调用_import_()函数
# eze.say()

 

posted @ 2018-04-28 22:20  未来的技术  阅读(114)  评论(0编辑  收藏  举报