課程
/后端開發(fā)
/Python
/初識Python
L?=?['Adam','Lisa','Bart'] L.insert(-1,'Paul') print?L
2015-10-15
源自:初識Python 4-4
正在回答
如果人數(shù)不止3個人的話,例如
L = ['Adam', 'Lisa', 'Bart','haha']L.insert(-1, 'Paul')print L
這樣的,你輸出就是 ['Adam', 'Lisa', 'Bart','Paul','haha'] 了。
看實(shí)際運(yùn)用吧。
舉報
學(xué)python入門視頻教程,讓你快速入門并能編寫簡單的Python程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2015-10-16
如果人數(shù)不止3個人的話,例如
L = ['Adam', 'Lisa', 'Bart','haha']
L.insert(-1, 'Paul')
print L
這樣的,你輸出就是 ['Adam', 'Lisa', 'Bart','Paul','haha'] 了。
看實(shí)際運(yùn)用吧。