![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python编程
文章平均质量分 78
robbyc
这个作者很懒,什么都没留下…
展开
-
《Python 第一章》基础知识
第一章 基础知识 1.1 简单使用和认识 python >>> 2**3 >>> pow(2, 3) >>> 2+8 >>> x = input("x: ") >>> print 'hello world' >>> print "hello world" >>> print 3 >>> print '3' >>> 0xAF原创 2013-01-14 18:48:24 · 320 阅读 · 0 评论 -
《Python 第二章》列表和元组
Python 最基本的数据结构 : 序列 『6种内建序列 - *元组和列表*』 元组vs列表 元组不能更改! 元组 做 字典的key,不能用列表!>>> edward = ['Uncle wang', 42] >>> john = ['John Smith', 50] >>> database = [edward, john] >>> database [['Uncle wang', 42原创 2013-01-15 13:38:55 · 245 阅读 · 0 评论 -
《Python 第三章》字符串
第3章 使用字符串 字符串的分割,联接,搜索。 3.1 基本字符串操作 标准的序列操作 (索引,分片,判断成员资格,求长度,最值) 对字符串同样使用。 3.2 字符串格式化>>> format = "Hello, %s. %s enough for ya?" # %s >>> values = ('world', 'Hot') >>> print format %values He原创 2013-01-15 16:22:32 · 294 阅读 · 0 评论 -
《Python 第四章》字典
字典 * 创建和使用字典 * dict()>>> phonebook = {'Alice': '2341', 'Beth': '9102', 'Ceil': '3258'} >>> phonebook {'Beth': '9102', 'Alice': '2341', 'Ceil': '3258'} >>> phonebook['Beth'] '9102' >>> items = [('nam原创 2013-01-16 13:06:18 · 225 阅读 · 0 评论