Python中的数据类型:
1.整数:写法和数学上写法一致,十六进制加上前缀0x——整数运算精确
2.浮点数:科学计数法,1.23e9表示1.23×10^9——浮点数运算不精确(四舍五入)
3.字符串:’ ’或“ ”括起来的任意文本
4.布尔值:True或False,运算有and、or和not
5.空值:None,不等于0
6.其它:列表、字典及自定义
1.整数:写法和数学上写法一致,十六进制加上前缀0x——整数运算精确
2.浮点数:科学计数法,1.23e9表示1.23×10^9——浮点数运算不精确(四舍五入)
3.字符串:’ ’或“ ”括起来的任意文本
4.布尔值:True或False,运算有and、or和not
5.空值:None,不等于0
6.其它:列表、字典及自定义
2017-01-31
把评论第一的试了一下↓
s = "'''Python was started in 1989 by \\\"Guido\\\".\n\n python is free and easy to learn.'''"
print s
s = "'''Python was started in 1989 by \\\"Guido\\\".\n\n python is free and easy to learn.'''"
print s
2017-01-31
r'''"To be, or not to be": that is the question.Whether it's nobler in the mind to suffer.'''
2017-01-30
'Python was started in 1989 by \"Guido\".python is free and easy to learn.'
2017-01-30
已采纳回答 / 浪漫别问我
输出结果是 :1*2 1*4 1*6 …… 1*100 3*2 3*4 3*6 ……3*100 5*2 5*4 5*6 …… 5*100 …………双重循环<...code...>
2017-01-30
已采纳回答 / fx2003
return 的作用是返回函数值,该地方函数直接执行print,并不需要返回值供主函数或其他函数处理。当然,你也可以在函数后加个return,但是因为主函数没有处理这个函数的机制,所以你的返回值并没有任何意义
2017-01-30