2019年5月8日
摘要: # set1={'asd','sv','cxv','xcv'} # #增加 # set1.add('bad') # print(set1) # #update # set1.update('abc') #迭代增加 # #删除 # set1.pop() #随机删除 # set1.remove() #指定删除 #del 删除 set2={1,2,3} set3={2,3,4} print(set2 ... 阅读全文
posted @ 2019-05-08 20:46 orange小橘子 阅读(87) 评论(0) 推荐(0) 编辑
  2019年5月7日
摘要: ascii A : 00000010 8位 一个字节 unicode A : 00000000 00000001 00000010 00000100 32位 四个字节 中:00000000 00000001 00000010 00000110 32位 四个字节 utf-8 A : 00100000 阅读全文
posted @ 2019-05-07 20:46 orange小橘子 阅读(136) 评论(0) 推荐(0) 编辑
摘要: #字典 #数据类型:可变and不可变 #不可变:元祖,bool,int,str,可哈西 #可变:list,dict 不可哈希 #key 不可变数据类型 value:任意数据类型 #优点:二分查找法,存储大量关系型数据 #特点:无序的 dic={'name':'小白','age':18,'sex':'male'} #增: dic['high']=175 #没有键值对,添加 dic['age']=1... 阅读全文
posted @ 2019-05-07 19:33 orange小橘子 阅读(117) 评论(0) 推荐(0) 编辑
  2019年5月6日
摘要: # li=['asd','fsd','sdfsf','faff'] # li.append('assf') #在最后增加 # li.append(1) # li.insert(1,'qew') #选定地方插入 # li.extend('sdad') #在最后迭代增加 # name=li.pop(0) #删除列表里的索引,并放置在变量中,默认删除最后一个 # li.remove('fsd') #删... 阅读全文
posted @ 2019-05-06 17:54 orange小橘子 阅读(235) 评论(0) 推荐(0) 编辑
  2019年5月5日
摘要: # print(51 or 3) #true # print(3>1 and 0) #0 #计算 1-2+3...+99中除88以外所有数的和 """count=1 sum=0 while count0: name=input('请输入用户名:') pd=input('请输入密码:') if username==name and password==pd: ... 阅读全文
posted @ 2019-05-05 19:27 orange小橘子 阅读(280) 评论(0) 推荐(0) 编辑
  2019年5月4日
摘要: count=0 while countnot>and>or print(3>4 or 42) #T print(2 > 1 and 3 5 and 2 2 and 3 5 and 2 > 1 or 9 1 and 3 5 and 2 > 1 and 9 > 8 or 7 1 and 3 5 and 2 > 1 and 9 > 8 or 7 2 and 3) #false prin... 阅读全文
posted @ 2019-05-04 19:05 orange小橘子 阅读(203) 评论(0) 推荐(0) 编辑
摘要: #1.while使用while循环输入1 2 3 4 5 6 8 9 10 '''count = 0 while count<10: count += 1 if count == 7: continue else: print(count)''' #2.while求1-100的和 '''count=1 sum=0 while count... 阅读全文
posted @ 2019-05-04 11:41 orange小橘子 阅读(140) 评论(0) 推荐(0) 编辑
  2019年5月3日
摘要: 1,计算机基础。2,python历史。 宏观上:python2 与 python3 区别: python2 源码不标准,混乱,重复代码太多, python3 统一 标准,去除重复代码。3,python的环境。 编译型:一次性将所有程序编译成二进制文件。 缺点:开发效率低,不能跨平台。 优点:运行速度 阅读全文
posted @ 2019-05-03 18:58 orange小橘子 阅读(175) 评论(0) 推荐(0) 编辑