L = []
x = 0
while x<100:
x = x+1
a = x*x
L.append(a)
print sum(L)
x = 0
while x<100:
x = x+1
a = x*x
L.append(a)
print sum(L)
2017-02-22
L = []
a = 1
b = 0
while a < 101:
b = a * a
a = a + 1
L.append(b)
print sum(L)
a = 1
b = 0
while a < 101:
b = a * a
a = a + 1
L.append(b)
print sum(L)
2017-02-22
# -*- coding: utf-8 -*-
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
2017-02-22
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.'''
2017-02-22
print 45678+0x12fd2
print "Learn Python in imooc"
print 100 < 99
print 0xff == 255
print "Learn Python in imooc"
print 100 < 99
print 0xff == 255
2017-02-22
s = 'Python was started in 1989 by "Guido".\nPython is free and easy to learn.'
print s
print s
2017-02-22
s = 'Python was started in 1989 by "Guido".\nPython is free and easy to learn.'
print s
print s
2017-02-22
print [m*100+n*10+l for m in range(1,10) for n in range(0,10) for l in range(0,10) if m==l]
2017-02-22
print(45678+0x12fd2)
print("Learn Python in imoo")
print(100 < 99)
print(0xff == 255)
print("Learn Python in imoo")
print(100 < 99)
print(0xff == 255)
2017-02-22
好像可以用'''吧。'''之间可以任意使用'和''。'''
2017-02-22
print [int(x+y+z) for x in '123456789' for y in '0123456789' for z in '0123456789' if (x+y+z)==(z+y+x)]
2017-02-22