亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

解釋器的結果和這種示例運行結果不一樣 能告訴我是什么原因嗎?

digits = [2,3,8,9,0,3,5,7]
print("The first three items in the list are: ")
print(digits[:3])
print("\nThree items from the middle of the list are: ")
print(digits[2:5])
print("\nThe last three items in the list are: ")
print(digits[-3:])

運行結果如下:

The first three items in the list are:?
[2, 3, 8]
Three items from the middle of the list are:?
[8, 9, 0]
The last three items in the list are:?
[3, 5, 7]


正在回答

舉報

0/150
提交
取消
初識Python
  • 參與學習       758382    人
  • 解答問題       8967    個

學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序

進入課程

解釋器的結果和這種示例運行結果不一樣 能告訴我是什么原因嗎?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號