python学习笔记(个人复习用)
_阿新_
这个作者很懒,什么都没留下…
展开
-
python学习笔记——Day2
2.1 字符串修改 #1.replace 函数 str="abcdefaw" new_str1=str.replace('a','A') print(new_str1) #2.split()函数 new_str2=str.split('a') print(new_str2) #3.join()函数 list=['ww','ee','rr'] new_list="..".join(list) pri...原创 2019-07-18 17:50:31 · 93 阅读 · 0 评论 -
python学习笔记——Day3
3.1 列表删除 name_list=['we','re','ou','lo','qs'] del name_list[1] print(name_list) del_name_list=name_list.pop() print(del_name_list) print(name_list) name_list.remove("we") print(name_list) name_list.cl...原创 2019-07-19 17:05:16 · 107 阅读 · 0 评论 -
python学习笔记——Day1
1.1 格式化输出 Name='xW' age=18 weight=60 num=23 print("my name is %s " % Name) print("I'm %d years old"% age) print("I'm %d kg"%weight) print("my student number is %03d"%num) print("my name is %s I'm %d y...原创 2019-07-17 16:28:29 · 95 阅读 · 0 评论