iT邦幫忙

0

python 問題

為何j是輸出29https://ithelp.ithome.com.tw/upload/images/20200420/20123538lBVX5Ctwbv.png

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

1
海綿寶寶
iT邦大神 1 級 ‧ 2020-04-20 21:09:36

因為 worlds_filter_list 有 29 個單字
最後的迴圈就變成像這樣
j=1..29, worlds_filter_list 是[0]..[28]

for j in range(1,29+1):
	print(j)   

print(j)

j 最後的值是 29 (<30)

我要發表回答

立即登入回答