Python Forum
Python code not working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python code not working
#2
The error
Error:
IndexError: list index out of range
is because your loop
while i <= len(temp):
is going one time too many, reduce the len condition by 1

The string methods upper and replace do not alter the original string, it returns an altered copy which is what then needs putting back into your list.
Reply


Messages In This Thread
Python code not working - by garvind25 - Jun-24-2020, 07:49 PM
RE: Python code not working - by Yoriz - Jun-24-2020, 09:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Please help me get this code working that i haven't posted yet damnit 3 2,459 May-22-2019, 09:57 PM
Last Post: Yoriz
  Code isnt working abdullahali 5 3,437 Oct-01-2018, 02:31 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020