Sep-29-2020, 05:08 AM
list indexes are 0-based, so the max index is len(some_list)-1. That said - don't use
In addition - you do some weird stuff like
for i in range(len(new_list))
to iterate over list. Look at https://python-forum.io/Thread-Basic-Nev...n-sequenceIn addition - you do some weird stuff like
variable = variable + "']"
Can you provide sample data for both lists and expected output?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs