2020年10月7日

python基础知识--2字符串

摘要: 1.字符串操作 1.字符串连接 print('A'+'B') 运行结果:AB 2.字符串多次连接 print('Python ' * 3) 运行结果:Python Python Python 3.字符串切片操作 print('Python'[0]) 运行结果:P 4.strip() # 去除空白字符 阅读全文

posted @ 2020-10-07 22:02 kunlungege 阅读(136) 评论(0) 推荐(0) 编辑

2020年10月6日

python基础知识--1注释

摘要: 1.注释 1.1单行注释 #print('hello','world') 1.2多行注释 ''' '''或 """ """2.换行\nprint("hello\nI love u") 运行结果 helloI love u 3.单引号,双引号及转义字符 print('hello world')prin 阅读全文

posted @ 2020-10-06 22:40 kunlungege 阅读(119) 评论(0) 推荐(0) 编辑

导航