L = ['adam', 'lisa', 'Paul', 'Bart']
L.pop()
L.pop()
print L
L.pop()
L.pop()
print L
2016-10-02
最新回答 / 岳阳白少
def square_of_sum(L): return (sum(A**2 for A in L))print (square_of_sum([1, 2, 3, 4, 5]))print (square_of_sum([-5, 0, 5, 15, 25]))
2016-10-02
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-10-01
已采纳回答 / 慕粉1011555035
Do you want something like below?n = 1sum = 0while True: x = 2**(n-1) n = n + 1 sum = sum + x if n > 20: breakprint sum
2016-10-01
Bob said "I\'m OK". ---Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
2016-09-30