![](https://img-blog.csdnimg.cn/20190918140158853.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Python基础
Python基础
Mr Zhao ( ̄▽ ̄)
这个作者很懒,什么都没留下…
展开
-
python操作Excel(xlrd和xlwt)
【代码】【无标题】原创 2023-07-09 21:29:19 · 292 阅读 · 1 评论 -
Python 读写JSON文件的基本操作
【代码】Python 读写JSON文件的基本操作。原创 2023-07-17 22:15:09 · 146 阅读 · 1 评论 -
Python 读写“.txt”文件操作
Python 读写“.txt”文件操作。原创 2023-07-15 20:09:03 · 97 阅读 · 1 评论 -
python中的常见异常处理
【代码】python中的常见异常处理。原创 2023-07-16 21:22:10 · 46 阅读 · 1 评论 -
用 VSCode 进行 Python 开发
用 VSCode 进行 Python 开发安装VScodeVSCode 官网上找到:https://code.visualstudio.com;微软提供了 Windows,Mac 和 Linux 平台上详尽的安装指引。安装Python运行环境Python官网下载安装包(https://www.python.org/downloads/)。安装时勾选:Add Python3.7 to PATH,勾上后,会自动配置环境变量。点击Next到底。安装Python插件打开VSCode软件;选择左侧原创 2021-06-05 23:56:23 · 205 阅读 · 1 评论 -
python基础(一)- 字符串、基本运算符、打印
python基础(一)python之禅import this字符串在Python中,用引号括起的都是字符串,其中的引号可以是单引号,也可以是双引号str1 = ‘I told my frend.“Python is my favorite language.”’print(str1)str1 = “‘Python’ is my favorite language.”print(str1)使用方法修改字符串的大小写str1 = “supper mAn”print(str1.title原创 2022-01-29 22:22:50 · 829 阅读 · 0 评论 -
python基础(二)- 列表
创建一个列表在Python中,用方括号([])来表示列表,并用逗号来分隔其中的元素。cities = ['Be Jing', 'Shang Hai', 'Shen Zhen', 'Cheng Du']print(cities)访问列表元素print(cities[0])print(cities[3])索引从 0 而不是 1 开始print(cities[1])访问最后一个列表元素print(cities[-1])使用列表中的各个值print(cities[2] + " is原创 2022-03-04 21:57:24 · 501 阅读 · 0 评论