摘要:
#需要掌握的操作 1、strip,lstrip,rstrip 2、lower,upper 3、startswith、endswith 4、format的三种玩法 #(1)字符串格式化 #方式1: #方式2:format 类似变量赋值 可默认位置 可用索引方法 format高级玩法 #(2)对齐 #( 阅读全文
摘要:
一、常用数据处理方法、 1、索引:按照号码将对应位置的数据取出使用 l=[1,2,3] print(l[0]) print(l[1]) print(l[2]) > 1 2 3 2、list将任意类型数据用逗号分割存在列表中 l=[1,2,3] print(l) > [1, 2, 3] 3、range 阅读全文