自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [Python] Lambda 表达式

[Python] Lambda 表达式Python版本:Python 2.7.13rc1Python Lambda 表达式普通函数和lambda表达式的区别嵌套作用域将lambda表达式作为参数嵌套lambda表达式1.普通函数和lambda表达式的区别>>> def f(x):return x**2>>> print f(8)64>>> g = lambda x:x**2>>> pri

2016-12-08 15:32:37 707

原创 [Python] input() vs raw_input()

Python版本:Python 2.7.13rc1ex1.py :name = input("What's your name? ")print("Nice to meet you " + name + "!")name2 = raw_input("What's your name? ")print("Nice to meet you " + name2 + "!")input():input

2016-12-16 14:45:12 198

原创 [Python]格式化输出(2)

Python版本:Python 2.7.13rc11.数字整型正确的写法:>>> print 'The value of PI is approximately %d ' % (3)The value of PI is approximately 3 >>> print 'The value of PI is approximately {:d} '.format(3)The value of

2016-12-15 13:06:54 1199

原创 [Python] 格式化输出(1)

Python版本:Python 2.7.13rc11.基本格式化输出Old style:%>>> print 'We are the %s who say "%s"!' % ('knights','Hi')We are the knights who say "Hi"!New style:str.format() method>>> print 'We are the {} who say "{}

2016-12-13 16:17:51 254

空空如也

空空如也

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

TA关注的人

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