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.'''
这中格式就是你三个单引号中有什么就输出什么
2015-12-16
print 'hello, pyhon'
print 'hello,','pyhon'
print 'hello,','pyhon'
2015-12-15
score = 85
if score>=90:
print 'excellent'
elif score>=80:
print 'good'
elif score>=60:
print 'passed'
else:
print 'failed'
if score>=90:
print 'excellent'
elif score>=80:
print 'good'
elif score>=60:
print 'passed'
else:
print 'failed'
2015-12-15
t = ('a', 'b', ('A', 'B'))
print t
print t
2015-12-15
最新回答 / Aka老田
import mathdef quadratic_equation(a, b, c): d=b*b-4*a*c if d>= 0: x1 = (-b+math.sqrt(d))/(2*a) x2 = (-b-math.sqrt(d))/(2*a) return x1,x2 else: returnprint quadratic_equation(2, 3, 0)print quadratic_equation(1, -6, 5...
2015-12-15
L = ['Adam', 'Lisa', 'Paul', 'Bart']
L.pop(2)
L.pop(-1)
print L
L.pop(2)
L.pop(-1)
print L
2015-12-15
>>> L =['Adam','Lisa','Bart']
>>> L.insert(2,'Paul')
>>> print L
>>> L.insert(2,'Paul')
>>> print L
2015-12-15
print [x*100+y*10+z for x in range(1,10) for y in range(0,10) for z in range(0,10) if x==z]
2015-12-15