文件操作

摘要: 打开 open 操作 读read 写write open("wenjian","w" encoding utf-8) open("wenjian","a" encoding utf-8) 读写 open("wenjian","r+" encoding utf-8) 读写 open("wenjian" 阅读全文
posted @ 2017-05-07 13:03 博客小川 阅读(64) 评论(0) 推荐(0)

集合

摘要: list_1=[1,2,34,45,] list_1=set(list_1) print(list_1) 交集 & 并集 | 对称集 ^ 阅读全文
posted @ 2017-05-07 12:59 博客小川 阅读(59) 评论(0) 推荐(0)

用户输入

摘要: import getpass _username="name" _password="pass" username=input("username") password=getpass.getpass("password") print(username,password) if _username 阅读全文
posted @ 2017-05-06 10:55 博客小川 阅读(71) 评论(0) 推荐(0)

学习了Python

摘要: 1 今天看视频看到里面的老师讲了Python的知识 学会了for循环 for i in range(10): i+=3 print("i") 循环三次 for 循环还有步长 步长只需一步就可以把奇数偶数 ,得出结果 ,有点神奇。 for i in range(1,10,2): 2 while 循环 阅读全文
posted @ 2017-05-06 00:36 博客小川 阅读(81) 评论(0) 推荐(1)