08 2018 档案

摘要:#coding=utf-8嵌套字典 dic = {'name': ['wanglishuaiu','fanzao','hehe'], 'py9': { 'time': "123123", 'learn_money': 19800, 'addr': 'CBD', }, 'age': '56'} #增加 dic['name'].append('ritian') dic[&# 阅读全文
posted @ 2018-08-27 13:21 王学长 阅读(846) 评论(0) 推荐(2)
摘要:特别注意: get ,, pop 兼有返回值,可在查询之时,判断是否存在此键. 阅读全文
posted @ 2018-08-27 11:24 王学长 阅读(30677) 评论(0) 推荐(0)
摘要:#改 阅读全文
posted @ 2018-08-24 19:22 王学长 阅读(1464) 评论(0) 推荐(0)
摘要:#coding=utf-8 username = "baidu" password = "123" i = 0 while i<3: name = input("请输入你的用户名:") pwd = input("请输入你的密码:") if username ==name and pwd ==password: print("登陆成功") ... 阅读全文
posted @ 2018-08-23 09:12 王学长 阅读(205) 评论(0) 推荐(0)
摘要:#coding=utf-8 count = 0 while count <=5: count +=1 if count == 3:break print("loop",count) else: print("正常执行完了!") print("----over----") #当循环被break打断的话就不会执行else 阅读全文
posted @ 2018-08-23 09:11 王学长 阅读(149) 评论(0) 推荐(0)
摘要:public class Arr{ public static void main(String[] args) { int arr[]=new int [5]; //定义方法2为//int []arr =new int [5](Java推荐使用) System.out.println(arr[0]); arr[0] = 10; System.out.println(arr[0]); } } /... 阅读全文
posted @ 2018-08-23 09:08 王学长 阅读(99) 评论(0) 推荐(0)
摘要:Numbers(数字)String(字符串)List(列表)Tuple(元组)Dictionary(字典)int 1,2,3用于计算bool True false 用于判断str 存储少量数据,进行操作 '1231asd','dasda'"asdsadsa",'asdsadsad'list :存储大 阅读全文
posted @ 2018-08-23 09:01 王学长 阅读(205) 评论(0) 推荐(0)
摘要:字符串的索引切片 类似于C语言中字符型的数组处理,但有很多地方不为相同. 阅读全文
posted @ 2018-08-19 09:37 王学长 阅读(232) 评论(0) 推荐(0)
摘要:在字符串中如若要格式化输出,则有如下方法,简单而又快捷. 阅读全文
posted @ 2018-08-17 15:12 王学长 阅读(136) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2018-08-05 18:29 王学长 阅读(32) 评论(0) 推荐(0)
摘要:突然想到这么一个逼迫自己学习的方法: 其实这个东西弥漫脑海很长时间了,今天把它写出来吧。 找个信得过的机构,把你的责任书交上去,然后交给他们一定的抵押,在这段时间达成一个目标(限制初始点和最终时间点),等你实现这个目标之后,就能拿回你抵押出去的东西,否则你的东西只能暂扣在机构之内,在规定的时间之内, 阅读全文
posted @ 2018-08-04 19:24 王学长 阅读(218) 评论(0) 推荐(0)