学习网站

摘要: https://ke.qq.com/course/350925 Python开发21天入门 https://www.ubuntu.com/index_kylin http://www.ubuntu.org.cn/global http://www.runoob.com/python/python-o 阅读全文
posted @ 2019-02-01 22:44 学渣的救赎 阅读(105) 评论(0) 推荐(0)

验证登陆.笔记

摘要: # _user = "alex"# _passwd = "abc123"## counter = 0# while counter < 3: #当 while 后面的条件成立(True),才会执行下面的代码## username = input("Username:")# password = in 阅读全文
posted @ 2018-11-24 17:14 学渣的救赎 阅读(122) 评论(0) 推荐(0)

字典.笔记

摘要: #字典是无序存储的# a=10# print(id(a))# b=a# print(id(b))# b=15# print(id(b))# print(a,b)# dic={1:'alex','age':'35','hobby':{'girl_name':'铁锤','age':'45'},'is_h 阅读全文
posted @ 2018-11-24 17:11 学渣的救赎 阅读(133) 评论(0) 推荐(0)

编码与解码.笔记

摘要: in python2默认 是 ASCIIin python3默认 是 unicodeencode 在编码的同时,会把数据转成 bytes 类型decode 在解码的同时,会把 bytes 类型转成字符串b = byte = 字节类型 = [0-255] #在python2.7 上的编码和解码s = 阅读全文
posted @ 2018-08-24 21:58 学渣的救赎 阅读(108) 评论(0) 推荐(0)

文件操作.笔记

摘要: #文件操作# 1.打开文件,得到文件句柄并赋值给一个变量# 2.通过句柄对文件进行操作# 3.关闭文件#能调用方法的一定是对象# li=[1,2,3]# li.append('2')# 'asc'.capitalize()#'r':读#'w':写#'a':在文件末尾追加内容,追加模式# import 阅读全文
posted @ 2018-08-24 21:53 学渣的救赎 阅读(146) 评论(0) 推荐(0)

三级登陆程序

摘要: #1.可以一层一层的进入到所有层#2.可以在每层返回上一层#3.可以在任意层退出 主菜单 menu={ "北京":{ '朝阳':{ '国贸':{ 'CICC':{}, 'CCTV':{}, 'HP':{}, '渣打银行':{}, }, '望京':{ '陌陌':{}, '奔驰':{}, '360':{ 阅读全文
posted @ 2018-08-02 21:50 学渣的救赎 阅读(373) 评论(0) 推荐(0)

String的内置方法

摘要: #String的内置方法st='hello kitty {name} is {age}'print(st.count('l')) # 统计元素个数print(st.capitalize()) # 首字母大写print(st.center(50,'-')) # 居中print(st.endswith( 阅读全文
posted @ 2018-07-31 15:59 学渣的救赎 阅读(118) 评论(0) 推荐(0)