Doublelift  
09 2018 档案
  • 字典 Dictionary
    摘要:1 #!-*- coding:utf-8 -*- 2 # Author:Steve 3 LOL={'SKT':'李相赫','RNG':'简自豪','EDG':'明凯'} 4 5 #查找 6 print(LOL['EDG']) 7 print(LOL.get('SKT')) 8 print('RNG' 阅读全文
    posted @ 2018-09-28 12:10 Doublelift 阅读(134) 评论(0) 推荐(0)
  • 字符串常用操作
    摘要:1 #!-*- coding:utf-8 -*- 2 # Author:Steve 3 4 5 #统计,第二个参数第三个参数分别为起始和结束的下标 6 print('i AM Steve'.count('e',0,3)) 7 #首字母大写 8 print('i AM Steve'.capitalize()) 9 #Python casefold() 方法是... 阅读全文
    posted @ 2018-09-27 17:50 Doublelift 阅读(116) 评论(0) 推荐(0)
  • 使用列表 写简单购物车
    摘要:1 #!-*- coding:utf-8 -*- 2 # Author:Steve 3 book_list=[('三国演义',60), 4 ('水浒传',65), 5 ('红楼梦',55), 6 ('西游记',70), 7 ('山海经',80), 8 ('封神演义',55)] 9 10 shoppi 阅读全文
    posted @ 2018-09-27 15:24 Doublelift 阅读(91) 评论(0) 推荐(0)
  • tuple
    摘要:1 #!-*- coding:utf-8 -*- 2 # Author:Steve 3 4 store=('math','english','chinese') 5 print ('\nNumber of books in the store is:',store) 6 7 new_store=(' 阅读全文
    posted @ 2018-09-26 17:23 Doublelift 阅读(151) 评论(0) 推荐(0)
  • list常用方法
    摘要:1 #!-*- coding:utf-8 -*- 2 # Author:Steve 3 import copy 4 5 names=['Steve','Jack','Jim','Stone','Person'] 6 print(names,end='//') 7 print(names[1:4],e 阅读全文
    posted @ 2018-09-25 22:14 Doublelift 阅读(309) 评论(0) 推荐(0)
  • 常用数据类型
    摘要:1 #!-*- coding:utf-8 -*- 2 # Author:Steve 3 4 5 #三元运算 6 a,b,c=5,1,6 7 d=a if a>b else c 8 f=a if a<b else c 9 print(d,f) 10 11 #bytes类型与string类型的相互转换 阅读全文
    posted @ 2018-09-25 22:12 Doublelift 阅读(263) 评论(0) 推荐(0)
  • pyc文件
    摘要:1.pyc文件 是python预编译后的字节码文件,并不是机器码。2.PyCodeObject 是Python编译器真正编译成的结果; 当python程序运行时,编译的结果是保存在PyCodeObject中。 在Python程序运行结束时,Python解释器则将PyCodeObject写回到pyc文 阅读全文
    posted @ 2018-09-25 22:09 Doublelift 阅读(223) 评论(0) 推荐(0)