print r'''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
2016-01-15
print r'''"To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.'''
表示很无语 在自己的电脑运行的好好的 放到这里 执行不了 后来看了答案 翻新To be 后面多了个空格 -_-||
Whether it's nobler in the mind to suffer.'''
表示很无语 在自己的电脑运行的好好的 放到这里 执行不了 后来看了答案 翻新To be 后面多了个空格 -_-||
2016-01-15
s = 'Python was started in 1989 by "Guido".\n Python is free and easy to learn. '
print s
print s
2016-01-15
最赞回答 / ericyang1987
\n 的确是换行的转义字符。如果说直接输出tds的话,会让所有学生的成绩横向排列。 join() 的意思是把换行符号和tds里面每一个touple都做了链接,相当于<tr><td>Lisa</td><td>85</td></tr>/n
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