03 2019 档案

摘要:# 定义函数def def func(): print('in the func') return 0 #定义函数 def func(x,y): x = x+y print(x) func(1,2) #定义函数传多个实参 * 开头变量名可以随便起 def func(*args) print(args 阅读全文
posted @ 2019-03-06 18:08 懒灬 阅读(59) 评论(0) 推荐(0)
摘要:#读取文件为r ,写为w , a 为写最后追加 f = open("dfsdfsdf",r,encoding = 'utf-8') #读写文件 f = open("dasdasda","r+",encoding ='utf-8') #写读文件 与读写区别 是先写后读取 。 f = opne("dfs 阅读全文
posted @ 2019-03-05 16:43 懒灬 阅读(157) 评论(0) 推荐(0)