#help with welcome text
1 messages ยท Page 1 of 1 (latest)
๐ ๐ค
the error is self explanatory
list indices must be integers or slices, not str
?tag lp
Official Beginner's Guide: https://wiki.python.org/moin/BeginnersGuide
Official Tutorial: https://docs.python.org/3/tutorial/
Shortcuts:
https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
https://wiki.python.org/moin/BeginnersGuide/Programmers
Learn Python:
https://automatetheboringstuff.com/ (for complete beginners to programming)
https://learnxinyminutes.com/docs/python3/ (for people who know programming already)
https://docs.python.org/3/tutorial/ (official tutorial)
http://python.swaroopch.com/ (useful book)
http://www.codeabbey.com/ (exercises for beginners)
learn python
In whichever line the error is coming from, you are trying to access some item by it's index in a list, however you are providing the string.
Basically, this is what's happening:
# What you're doing
some_index = "some_string" # Index must be int, you are providing a string in your code
some_var = some_list[some_index]
# What you should be doing
some_index = 1 # Index must be int
some_var = some_list[some_index]
You didn't provide the full error so I'm not sure which line is actually causing the issue, but that's what is going on ^
@charred sun go learn python XD
lmao