随笔分类 -  Python

摘要:1 # st='hello kitty {name} is {age}' 2 # 3 # print(st.count('l')) # 统计元素个数 4 # print(st.capitalize()) # 首字母大写 5 # print(st.center(50,'#')) # 居中 6 # print(st.endswith('tty3')) # ... 阅读全文
posted @ 2018-08-09 20:57 Money131 阅读(155) 评论(0) 推荐(0)
摘要:2018-08-08 最次的 购物车 删除: a.remove() a.pop() # ()内容为数字 ,牵引的编号 del #可以删除任何值、表、对象。 计算 count 添加 extend 附加 append len(product_list) 显示列表长度 阅读全文
posted @ 2018-08-08 20:51 Money131 阅读(193) 评论(0) 推荐(0)
摘要:循环loop 有限循环 ,次数限制 无限循环=死循环 continue 结束本次循环,继续下一次循环 break 跳出整个当前的循环 forwhilebreak continue 数据类型 整数 字符串 列表,元组 查 索引(下标) ,都是从0开始 切片 .count 查某个元素的出现次数 .ind 阅读全文
posted @ 2018-08-07 20:56 Money131 阅读(108) 评论(0) 推荐(0)
摘要:location 位置 untitled 未命名的 fullstack 全栈 interpreter 解释器 字符格式化输出 占位符 %s s = string %d d = digit 整数 %f f = float 浮点数,约等于小数 数据运算 数据类型出初识 数字 整数 int(integer 阅读全文
posted @ 2018-08-07 08:50 Money131 阅读(118) 评论(0) 推荐(0)