python
文章平均质量分 93
python题目和学习笔记
九月星城
这个作者很懒,什么都没留下…
展开
-
python编程从入门到实践学习笔记
第一章 一、安装python 1.python官网地址 https://www.python.org/downloads/release/ 2.下载好后用管理员模式打开安装包 3. 第二章 2.1 运行 hello_world.py 运行文件拓展名为.py的文件,编辑器会用python解释器来运行它。 语法高亮 2.2 变量 ‘’‘python message = “hello python world” ‘’’ 其中message为变量 2.2.1 变量的命名和使用 变量名只能包含字母、数字和下划线。可原创 2021-07-20 17:10:30 · 884 阅读 · 1 评论 -
py从入门到sj课后第九章
9-1 #!/usr/bin/env python # -*- coding:utf-8 -*- class Restaurant(): def __init__(self,restaurant_name,cuisine_type): self.name = restaurant_name self.type = cuisine_type d...原创 2018-08-12 16:21:45 · 156 阅读 · 0 评论 -
python从入门到sj 第十章
10-1 #!/usr/bin/env python # -*- coding:utf-8 -*- file = 'learning.txt' with open(file) as file_object: contents = file_object.read() print(contents.rstrip()) with open(file) as file_obj...原创 2020-02-17 12:33:07 · 136 阅读 · 0 评论