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-08-18
s = 'Python was started in 1989 by "Guido".\n Python is free and easy to learn.'
print s
print s
2016-08-18
x1 = 1
d = 3
n = 100
x100 =x1+(n-1)*d
s = (x1+x100)*100/2
print s
需要用到数学必修5的数列有关的知识知识
d = 3
n = 100
x100 =x1+(n-1)*d
s = (x1+x100)*100/2
print s
需要用到数学必修5的数列有关的知识知识
2016-08-18
s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for e in L:
if e in s:
s.remove(e)
else:
s.add(e)
print s
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for e in L:
if e in s:
s.remove(e)
else:
s.add(e)
print s
2016-08-17
代码中的b='',是一个空字符,看成是false;若是写成b=' ',则看成b是true,第二个返回的值就是hello,
2016-08-17
#-*-coding:utf-8 -*-
print r'''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
You are welcome.
print r'''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
You are welcome.
2016-08-17
t = ('a', 'b', ('A', 'B'))
print t
学会套路了
print t
学会套路了
2016-08-17
最新回答 / 笑笑佛
你这两个结果其实是一样的,区别在于你的盘子原来在哪个塔上,要移动到哪个塔上。第一个结果表示你借助B把A上的两个盘子移动到C上,第二个结果是你借助C把A上的两个盘子移动到B上。这个要递归的函数参数顺序不同输出也就不同,但实际上并没有区别啊,你把你初始输入参数顺序调一下就对了。
2016-08-17
L = ['Adam', 'Lisa', 'Bart']
L[0]='Bart'
L[-1]='Adam'
print L
直接这样就通过了
L[0]='Bart'
L[-1]='Adam'
print L
直接这样就通过了
2016-08-17
已采纳回答 / 我是搬运工
是一样的,>>> for i in range(10): print(i)0123456789>>> for i in range(0,10): print(i) 0123456789>>>
2016-08-17