自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 【python】file.write() 和 open()

file.write()参数只接受str,所以如果想以格式化的方式作为参数写入文件的话,就需要用的str()函数了,例如“:target.write(str("The second formate\n %s\n%s\n%s\n") %(line1,line2,line3))关于open()open 有 'w', 'r','+' 以及 ‘a'  模式。w 没有

2013-09-29 13:14:57 4496

转载 【python】raw_input() 和input()

raw_input() 与 input() __ Python这两个均是 python 的内建函数,通过读取控制台的输入与用户实现交互。但他们的功能不尽相同。举两个小例子。 1 >>> raw_input_A = raw_input("raw_input: ") 2 raw_input: abc 3  >>> input_A = input("Input: ") 4 Inpu

2013-09-28 15:40:59 402

原创 【Python 】奇怪的引号

do_like= "do'like"binary="binary" #stringdo_not="don't" #stringx="there are types of people and %s" %("do'like")y="those who know %s and those who %s" %(binary,do_not) print "i said: '%s ' " %xp

2013-09-26 22:01:50 422

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除