会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
塔塔尔族
博客园
首页
新随笔
联系
管理
订阅
随笔分类 -
Python
Python中的鸭子类型和多态
摘要:类和对象1.鸭子类型:定义多个类,多个类都有相同名字的方法名,调用方法是可以同时调用官方定义: 当看到一只鸟走起来像鸭子,游泳起来像鸭子,叫起来像鸭子,那么这只鸟就可以被称之为鸭子 class Cat(object): def say(self): print("I am a cat") class
阅读全文
posted @
2019-01-24 23:22
塔塔尔族
阅读(93)
评论(0)
推荐(0)
pip 豆瓣源安装notebook
摘要:1.ipython工具 安装pip install ipython2.notebook 工具安装 pip install -i https://pypi.douban.com/simple notebook运行 ipython notebook 会打开浏览器在浏览器中写代码测试起来会非常方便
阅读全文
posted @
2019-01-24 21:21
塔塔尔族
阅读(227)
评论(0)
推荐(0)
python中字节与字符串的转换
摘要:#bytes object byte = b"byte example" # str object str = "str example" # str to bytes 字符串转字节 bytes(str, encoding="utf8") # bytes to str 字节转字符串 str(byte
阅读全文
posted @
2018-12-16 14:29
塔塔尔族
阅读(38569)
评论(0)
推荐(2)
11day
摘要:qujfaj
阅读全文
posted @
2018-06-23 22:00
塔塔尔族
阅读(116)
评论(0)
推荐(0)
10day
摘要:去演
阅读全文
posted @
2018-06-23 21:59
塔塔尔族
阅读(71)
评论(0)
推荐(0)
9day条件语句和基本数据类型
摘要:1基本数据类型: 字符串‘’," ",''' ''' 单引号,双引号,三引号 加法: n1='ruser' n2='sb' n3=n1+n2 print(n3) 乘法: n1='ruser' n2=n1*10 print(n2) ruserruserruserruserruserruserruser
阅读全文
posted @
2018-06-23 21:57
塔塔尔族
阅读(108)
评论(0)
推荐(0)
公告