![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Eve慕
这个作者很懒,什么都没留下…
展开
-
Python基础
Python有交互式编辑器,输入之后可以即时得到结果。还有就是通过文本编辑器来写代码,全部写完后一起执行。 交互式编辑器 Windows中安装完Python后打开IDLE即可。Linux中在命令行中输入Python3即可(部分Linux系统输入Python后默认为Python2.6或者2.7)。 文本编辑器 Windows安装完Python后打开IDLE,新建文件会有一个自带的编辑器,写完原创 2017-09-19 18:44:41 · 301 阅读 · 0 评论 -
Python for循环
Python有for循环和while循环两种 这里主要整理for循环的用法。 循环遍历出list和tuple中的数据 names = ['Michael', 'Bob', 'Tracy'] for name in names: print(name) 循环遍历数字 for i in range(1,100): print(i) 会打印出1到99的数字原创 2017-09-21 17:22:41 · 326 阅读 · 0 评论 -
Python大小写转换
来自:http://blog.csdn.net/xxzhangx/article/details/52695089 大写 把所有字符中的小写字母转换成大写字母 >>> str = "hELLO world!" >>> print (str.upper()) HELLO WORLD!123 小写 把所有字符中的大写字母转换成小写字母 >>> str = "转载 2017-10-11 10:40:25 · 31827 阅读 · 1 评论