复习map\filter\reduce\file

# # # s=[1,2,3,4]
# # # print(list(map(str,s)))#字符串输出
# # from functools import reduce#reduce 需要导入
# # s=[1,2,3,4]
# # res=reduce(lambda x,y:x+y,s,3)
# # print(res)
# name=['ali','blia']
# res=filter(lambda x:  not x.endswith('a'),name)
# print(list(res))#过滤掉a结尾的
f=open('eze.py','a+',encoding='utf-8')#读写
# data=f.read()
# print(data)
f.write('你好,这是a+内容')
f.close()

 

posted @ 2018-04-29 16:40  未来的技术  阅读(146)  评论(0编辑  收藏  举报