1. 程式人生 > >python基礎面試題

python基礎面試題

spa ever print pan spl rev tom pos ()

字符串翻轉輸出:

a="I am tom"
b=a.split(" ")
print(b)
b.reverse()
print(b)

[‘I‘, ‘am‘, ‘tom‘]
[‘tom‘, ‘am‘, ‘I‘]



python基礎面試題