Review map\filter\reduce\file

# # # s=[1,2,3,4] 
# # # print(list(map(str,s)))#String output 
# # from functools import reduce#reduce needs to import 
# # 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))#Filter out the end of a 
f=open( ' eze.py ' , ' a+ ' ,encoding= ' utf-8 ' ) # Read and write 
# data=f.read() 
# print(data) 
f.write( 'Hello, this is a+ content ' )
f.close()

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325025322&siteId=291194637