s = 'Python was started in 1989 by "Guido".\n Python is free and easy to learn. '
print s
print s
2016-01-15
d = {
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
for key in d:
print key+':'+str(d[key])
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
for key in d:
print key+':'+str(d[key])
2016-01-14
L = [95.5,85,59]
print L[0]
print L[1]
print L[2]
print L[-1]
为什么这样回答就能提交
print L[0]
print L[1]
print L[2]
print L[-1]
为什么这样回答就能提交
2016-01-14
x1 = 1
d = 3
n = 100
x100 = x1 + (n - 1) * 3
s = n*(x1 + x100)/2
print s
d = 3
n = 100
x100 = x1 + (n - 1) * 3
s = n*(x1 + x100)/2
print s
2016-01-14
print 'hello,python'
print "hello,python"
print "hello,python"
2016-01-14
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
2016-01-14
>>> print (u'''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。''')
静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。
其实3.4挺好的……
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。''')
静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。
其实3.4挺好的……
2016-01-14