python
iihacker_cat
这个作者很懒,什么都没留下…
展开
-
python,hello world
能有家人的陪伴是幸福的。步入话题 1 下载 https://www.python.org/downloads/ 2 安装 安装python的时候把python的写入环境变量。 3 最简单的helloworld 在开始菜单运行python 或者找到C:\Python36-32\python.exe Python 3.6.2 (v3.6.2:原创 2017-09-11 23:12:59 · 445 阅读 · 0 评论 -
python常用语法
多行语句 Python语句中一般以新行作为为语句的结束符。 但是我们可以使用斜杠( \)将一行的语句分为多行显示,如下所示: total = item_one + \ item_two + \ item_three 语句中包含 [], {} 或 () 括号就不需要使用多行连接符。如下实例: days = ['Monday', 'Tuesday'原创 2017-09-17 09:32:34 · 188 阅读 · 0 评论 -
python的for if语法
for i in range(5): if (i == 1): print(1); print(2); elif(i ==2): print(3); print(4); print('all'); 把上面代码保存到.py文件, 运行(我是用的是geany工具)后的结果是: all 1 2 all 3 4 all all all原创 2017-09-17 10:48:04 · 855 阅读 · 0 评论