简体   繁体   中英

Why am i getting the error of "List Index out of range"

Im trying to make a connect four game. My 2d list prints only one 0. I've looked through many sources在此处输入图像描述

Im attempting to print my 2d list "Board"

line 16:

print([rows][cols], end=' ')

should be

print(board[rows][cols], end=' ')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM