參考答案有問題吧,應該是
hello='Hello'
space=' '
world='World'
print(hello+space +world)
hello='Hello'
space=' '
world='World'
print(hello+space +world)
2020-09-09
L = ['Alice', 66, 'Bob', True, 'False', 100]
for item in L:
i=L.index(item)
if(i%2)!=0:
print(item)
for item in L:
i=L.index(item)
if(i%2)!=0:
print(item)
2020-09-09
已采納回答 / qq_慕少3205394
template='Life?is?short,you?need?{P}' P='python' result=template.format(P=P) print(result)P相當于占位符,沒有給他賦值
2020-09-08
age = 19
if age>=18:
print('adult'+' '+str(age))
if age>=18:
print('adult'+' '+str(age))
2020-09-07
print('special string: \', ", \\, \\\\, \\n, \\t')
2020-09-07