
Python
不见蝴蝶不见君。
这个作者很懒,什么都没留下…
展开
-
Python基础知识思维导图
前几天整理了一下Python面向对象部分,今天决定把其他的基础部分也分享出来:转自http://blog.youkuaiyun.com/peiyao456/article/details/72578476?ref=myread转载 2017-05-20 18:46:07 · 1110 阅读 · 0 评论 -
Python转义字符
在需要在字符中使用特殊字符时,python用反斜杠(\)转义字符。如下表:原始字符串有时我们并不想让转义字符生效,我们只想显示字符串原来的意思,这就要用r和R来定义原始字符串。如:print r'\t\r'实际输出为“\t\r”。 转义字符描述\(在行尾时)续行符\\反斜杠符号\'单引号转载 2017-09-24 17:34:41 · 6508 阅读 · 0 评论 -
Python基础知识思维导图
前几天整理了一下Python面向对象部分,今天决定把其他的基础部分也分享出来:转自http://blog.youkuaiyun.com/peiyao456/article/details/72578476?ref=myread原创 2018-06-23 17:30:19 · 290 阅读 · 0 评论 -
Python中字典的items(), keys(), values()方法
>>> dict = {1:2,'a':'b','hello':'world'}>>> dict.items()[('a', 'b'), (1, 2), ('hello', 'world')]>>> dict.keys()['a', 1, 'hello']>>> dict.values()['b', ...原创 2018-09-11 12:51:16 · 2311 阅读 · 0 评论 -
Python中TypeError: object() takes no parameters问题的解决办法
class Car(): """模拟一次汽车的简单尝试""" def _init_(self, make, model, year): """初始化汽车属性""" self.make = make self.model = model self.year = year de原创 2018-09-17 12:15:00 · 1324 阅读 · 0 评论 -
Python第九章 类
9.1创建和使用类动手试一试9-1class Restaurant(): def __init__(self,name,type): self.name=name self.type=type def describe_restaurant(self): print(self.name+"is a "+self.type...原创 2018-09-19 13:27:30 · 305 阅读 · 0 评论 -
第十章 文件和异常
动手试一试10-1 python 学习笔记.txt文件python 可以修图片python 可以做游戏python 可以爬取数据.py文件 filename="scratch.txt"with open(filename,encoding="utf-8")as file_object: contents=file_object.read() print...原创 2018-09-24 17:23:08 · 211 阅读 · 0 评论