随笔分类 -  Python

摘要:#函数 def fun(a,b='b'): print("fun"+a+b) return a fun(b='b',a='a')#关键字实参 #传递任意数量实参 实参封装到元组里 def fun1(*arg): print(arg) for a in arg: print(a) fun1("lol" 阅读全文
posted @ 2022-08-29 16:11 lwx_R 阅读(23) 评论(0) 推荐(0) 编辑
摘要:print("Hello World") # 变量 a=" this is string " print(a) # 字符串方法 print(a.title())#首字母大写 print(a.strip())#去除开头和结尾空白 lstrip()开头 rstrip()结尾 print(a.upper( 阅读全文
posted @ 2022-08-22 18:10 lwx_R 阅读(28) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示