会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
batur
博客园
首页
新随笔
联系
管理
订阅
2014年12月20日
24点游戏
摘要: 写博客啊,写博客\t ----------------三个空格%i---------------%i和%d几乎一样,表示有符号的十进制try ..except-----异常处理ast模块,ast.parsere模块,re.searchcontinuefrom __future__ import di...
阅读全文
posted @ 2014-12-20 09:09 batur
阅读(172)
评论(0)
推荐(0)
2014年12月9日
Python学习笔记1209
摘要: 将string中有元音字母的去掉,replace 函数1 def anti_vowel(text):2 for i in text:3 if i in "aeiouAEIOU":4 text=text.replace(i,'')5 return...
阅读全文
posted @ 2014-12-09 22:37 batur
阅读(163)
评论(0)
推荐(0)
2014年12月4日
Python学习笔记1204
摘要: BattleShip,这两个是新接触到的1)生成a,b之间的随机数:1 from random import randint2 randint(a,b)2)去掉list中的引号和逗号1 def print_board(board):2 for row in board:3 p...
阅读全文
posted @ 2014-12-04 16:31 batur
阅读(134)
评论(0)
推荐(0)
2014年12月3日
Python学习笔记1203
摘要: 正在Codecademy学习Python,在Battleship中的Printing Preety提到:print " ".join(letters)这个就将list中string的引号和逗号去掉,打印出来print "---".join(letters)这样就将元素用---连接起来例如这个代码: ...
阅读全文
posted @ 2014-12-03 20:12 batur
阅读(124)
评论(0)
推荐(0)
公告