Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python index list out of range on 3.10 V studio and python 3.10 for row in range enumerate #2

Open
leronOthesideofEggs opened this issue Nov 22, 2022 · 1 comment

Comments

@leronOthesideofEggs
Copy link

i followed the youtube video exactly and i even copy pasted the full code stack on git to my VS IDE
it still doesnt work

Message=list index out of range
Source=C:\Users\leron\source\repos\Lottery App\Lottery_App.py
StackTrace:
File "C:\Users\leron\source\repos\Lottery App\Lottery_App.py", line 38, in print_slot_machine
for row in range(len(columns[0])):
File "C:\Users\leron\source\repos\Lottery App\Lottery_App.py", line 110, in main
print_slot_machine(slots)
File "C:\Users\leron\source\repos\Lottery App\Lottery_App.py", line 116, in (Current frame)
main()

def print_slot_machine(columns):
for row in range(len(columns[0])):
for i, column in enumerate (columns):
if i != len(columns) - 1:
print(column[row], end="|" )
else:
print(column[row], end="")

    print()
@mcgunasinghe
Copy link

Problem is inside your get_slot_machine_spin(function)
Look this code ... column.append(column)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants