摘要: # 第 7 章 用户输入和while循环# 7.1 函数input()的工作原理# message = input("Tell me something, and I will repeat it back to you: ")# print(message) # 7.1.1 编写清晰的程序# na 阅读全文
posted @ 2020-07-11 20:47 燃烧信仰TopTan 阅读(208) 评论(0) 推荐(0)
摘要: # 6.1 一个简单的字典alien_0 = {'color': 'green', 'points': 5}print(alien_0['color'])print(alien_0['points']) # 6.2 使用字典# 6.2.1 访问字典中的值alien_0 = {'color': 'gr 阅读全文
posted @ 2020-07-03 16:08 燃烧信仰TopTan 阅读(246) 评论(0) 推荐(0)
摘要: # 5.1 一个简单示例cars = ['audi', 'bmw', 'subaru', 'toyota']for car in cars: if car == 'bmw': print(car.upper()) else: print(car.title()) # 5.2.1 检查是否相等car 阅读全文
posted @ 2020-06-30 09:40 燃烧信仰TopTan 阅读(168) 评论(0) 推荐(0)
摘要: # 4.1 遍历整个列表magicians = ['alice', 'david', 'carolina']for magician in magicians: print(magician) # 4.1.2 在for循环中执行更多的操作magicians = ['alice', 'david', 阅读全文
posted @ 2020-06-30 09:39 燃烧信仰TopTan 阅读(170) 评论(0) 推荐(0)
摘要: # 3.1 列表是什么bicycles = ['trek', 'cannondale', 'redline', 'specialized']print(bicycles) # 整个列表打印输出包括方括号# 3.1.1 访问列表元素bicycles = ['trek', 'cannondale', ' 阅读全文
posted @ 2020-06-08 11:23 燃烧信仰TopTan 阅读(182) 评论(0) 推荐(0)
摘要: # 打印print("Hello World!")# 2-1 变量,打印函数message = 'Hello Python World!'print(message)# 2-2 修改变量,再打印出来a = 'Hello Python World!'print(a)# 重新定义变量,变量刷新值# 变量 阅读全文
posted @ 2020-06-08 11:22 燃烧信仰TopTan 阅读(169) 评论(0) 推荐(0)
摘要: # pycharm常用快捷键和注释操作# win8系统管理员窗口快捷键:win + X + A# 注释行:Ctrl + /# 块注释:Ctrl + Shift + /# 代码规范(PEP 8)提示:Ctrl + Alt + L# 代码跳转:Ctrl +鼠标点击# 快速复制一行:把鼠标放在该行末尾,按 阅读全文
posted @ 2020-04-13 17:34 燃烧信仰TopTan 阅读(162) 评论(0) 推荐(0)