![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
技巧总结
xiaoguuca
新鲜水果,原产地发货。淘宝店名:水果鲜的吗
展开
-
字符串操作
格式化输出整数 strHello = "the length of (%s) is %d" %('Hello World',len('Hello World')) print(strHello) #the length of (Hello World) is 11 strHELLO = "the length of (%s) is %d" %('Hello world',len('Chao Be...原创 2019-04-27 10:39:33 · 104 阅读 · 0 评论 -
列表操作
添加 li=['a','b','c'] li.insert(3,'ddd')#列表从0开始[0,1,2,3,] print(li) #['a', 'b', 'c', 'ddd'] 加入第三位 删除 li=['a','b','c'] del li [1] print(li)#['a', 'c'] li.remove('a') print(li)#['c'] pop() 函数用于移除列表中的一个元...原创 2019-04-27 11:12:25 · 97 阅读 · 0 评论 -
函数用法
type函数 type用法 一个参数 type(object) names=['张三',['李四','王五'],'赵六'] print(type(names))#<class 'list'> 三个参数 tpye(name, bases, dict) name 类名 bases 父类的元组 dict 类的属性方法和值组成的键值对 int函数用法 print(int(3)) lam...原创 2019-04-27 11:21:28 · 90 阅读 · 0 评论