L = [95.5, 85, 59]
print L[-1]
print L[-2]
print L[-3]
#print L[-4]
print L[-1]
print L[-2]
print L[-3]
#print L[-4]
2016-08-26
打开python 打了答案的代码然而却是这样的Traceback (most re):
File "codeop.py", line 168, in __call__
File "codeop.py", line 99, in _maybe_compile
File "codeop.py", line 87, in _maybe_compile
File "codeop.py", line 133, in __call__
File "<input>", line 1
print s
^
SyntaxError: invalid syntax
File "codeop.py", line 168, in __call__
File "codeop.py", line 99, in _maybe_compile
File "codeop.py", line 87, in _maybe_compile
File "codeop.py", line 133, in __call__
File "<input>", line 1
print s
^
SyntaxError: invalid syntax
2016-08-26
已采纳回答 / 慕粉3871696
def FirstChrCaptial(x): return x[0].upper()+x[1:].lower()print FirstChrCaptial('hello')print FirstChrCaptial('sunday')print FirstChrCaptial('sHELL')
2016-08-26
L = ['Adam', 'Lisa', 'Bart']
L.reverse()
print L
L.reverse()
print L
2016-08-26
L = ['Adam', 'Lisa', 'Bart']
L.insert(2,'Paul')
print L
#矮油,不错哦!!!
L.insert(2,'Paul')
print L
#矮油,不错哦!!!
2016-08-26
L = [95.5, 85, 59]
print L [-1]
print L [-2]
print L [-3]
#你们别想太多,这老师答案有误,就应该这样子吗,秒的,没有L[-4]
print L [-1]
print L [-2]
print L [-3]
#你们别想太多,这老师答案有误,就应该这样子吗,秒的,没有L[-4]
2016-08-26