摘要: 备注:列表元素索引下限从0开始,列表用[ ]表示 阅读全文
posted @ 2020-12-26 22:30 tigergaonotes 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 备注:#用来注释代码,#后面的内容会被python解释器忽略 阅读全文
posted @ 2020-12-26 22:25 tigergaonotes 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 i=1.0 j=3 print(i*j) print(i+j) print(i**j) 备注:无论是哪种运算,只要有操作数是浮点数,python默认得到的都是浮点数,结果也总是浮点数 阅读全文
posted @ 2020-12-26 22:19 tigergaonotes 阅读(251) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 i=1 j=3 print(i*j) print(i**j) 阅读全文
posted @ 2020-12-26 22:16 tigergaonotes 阅读(105) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 message="python" print(message) print("\tpython") print("hello\npython\nhello\nworld") 阅读全文
posted @ 2020-12-26 22:09 tigergaonotes 阅读(85) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 first_name='tiger' last_name='gao' full_name= f"{first_name} {last_name}"--f为format的缩写 print(full_name) print(full_nam 阅读全文
posted @ 2020-12-26 21:59 tigergaonotes 阅读(48) 评论(0) 推荐(0) 编辑