会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Python note
Life is short,you need Python
博客园
首页
管理
2013年10月8日
python file not open for writing
摘要: python 要写入的文件必须是打开状态,如果未打开则会提示 “file not open for writing”。open/文件常用操作
阅读全文
posted @ 2013-10-08 16:15 Salm0n
阅读(962)
评论(0)
推荐(0)
2013年8月14日
Python 元组
摘要: 索引1 str1='123456'2 print str1[0],str1[1]输出:12切片str1='123456'print str1[1:3]print str1[1:5:2]print str1[::]# 起始 结尾 步长,数字可省 冒号必须输出:2324123456基本操作: 1 str1='123' 2 str2='321' 3 print len(str1) 4 print str1+str2 5 print str1*3 6 print '1' in str1 7 print '2'
阅读全文
posted @ 2013-08-14 23:10 Salm0n
阅读(209)
评论(0)
推荐(0)
2013年8月11日
if、for、while、break、continue
摘要: Python if、for、while、break、continue 语法
阅读全文
posted @ 2013-08-11 22:16 Salm0n
阅读(1121)
评论(0)
推荐(0)
2013年7月7日
Python 入门笔记 字符串 变量 标示符
摘要: 字符串--------------------单引号和双引号字符串是完全相同的;三引号,可以指示一个多行的字符串,可以在三引号中自由的使用单引号和双引号。代码行很长,要分两行写,可在第一行结尾用 \ 做连接符,两行都不用分号。在自然字符串前加r或R,实现反转义功能(r'hello \n world'='hello \\n world')。字符串不可变。两个字符创按字面意义相邻,自动级联。变量--------------------变量不需声明,可直接使用查询变量类型函数 type(a)a=5print a,type(a)直接对原变量赋值可以替换原变量1 a=52
阅读全文
posted @ 2013-07-07 17:10 Salm0n
阅读(813)
评论(0)
推荐(0)
2012年9月15日
Hello World
摘要: Hello World!
阅读全文
posted @ 2012-09-15 13:27 Salm0n
阅读(104)
评论(0)
推荐(0)
公告