print r'''"To be,or not to be":that is the question.
Whether it's nobler in the mind to suffer.'''
Whether it's nobler in the mind to suffer.'''
2016-04-13
s = 'Python was started in 1989 by "Guido".\nPython is free and easy to learn.'
print s
print s
2016-04-13
s = 'Python was started in 1989 by \"Guido\".\n Python is free and easy to learn.'
print s
print s
2016-04-13
最赞回答 / 清波
今天早上,敲了好多字,手指头酸了。。。。我 偷个懒,先贴源码:<...code...>只能说源代码 不严谨,没考虑 t 的求值过程可能会发生 error, 题主的代码就是少写了个冒号,正确的如下:<...code...>
2016-04-12
def average(*args):
if args:
return sum(args)*1.0/len(args)
else:
return 0.0
print average()
print average(1, 2)
print average(1, 2, 2, 3, 4)
if args:
return sum(args)*1.0/len(args)
else:
return 0.0
print average()
print average(1, 2)
print average(1, 2, 2, 3, 4)
2016-04-12
sum = 0
x = 1
while ((x % 2) != 0) & x <= 100
sum += x++
print sum
x = 1
while ((x % 2) != 0) & x <= 100
sum += x++
print sum
2016-04-12
# -*- coding: utf-8 -*-
d = {
95:['Adam',],
85:['Lisa',],
59:['Bart',]
}
d = {
95:['Adam',],
85:['Lisa',],
59:['Bart',]
}
2016-04-12