Python Forum
list index out of range
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
list index out of range
#2
You should include your code in your post, not as a link. You should also post the error message including the entire traceback. You should also provide some example input and any output

You've been looking at this for 4 hours. What have you tried to better understand the reason for the error?

If you want to loop over the strings in Q1, why not do this?
for word in Q1.rsplit():
    if word in issues:
        print("We have identified the problem")
        break
else # Didn't find word in issues
    humandata = input("We could not find an automated solution for you, please type as much infomation about the issue and we will let a technician sort it out")
    cases += 1
    new_issues.write(str(cases))
    new_issues.write(humandata)
Reply


Messages In This Thread
list index out of range - by OliverG - Aug-31-2021, 05:13 PM
RE: list index out of range - by deanhystad - Aug-31-2021, 05:18 PM
RE: list index out of range - by OliverG - Aug-31-2021, 05:26 PM
RE: list index out of range - by itsmycode - Sep-03-2021, 12:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to fix list index out of range longmen 26 6,409 Apr-27-2022, 05:46 PM
Last Post: deanhystad
  Index List a04j 2 2,997 Jul-10-2021, 01:14 PM
Last Post: BashBedlam
  List index out of range when turning CSV into dict ranbarr 15 6,772 May-12-2021, 10:38 AM
Last Post: ranbarr
  List vs index: Frederico_Caldas 5 3,729 Jul-03-2020, 10:55 AM
Last Post: DeaD_EyE
  To find the index of the first occurrence of the key in the provided list Angry_bird89 4 3,374 Jun-20-2020, 06:53 PM
Last Post: Angry_bird89
  list index out of range mcgrim 2 2,987 May-25-2019, 07:44 PM
Last Post: mcgrim
  IndexError: list index out of range abdullahali 4 3,973 Jan-17-2019, 07:54 AM
Last Post: buran
  String index out of range felie04 2 5,637 Aug-17-2018, 11:18 PM
Last Post: felie04
  Accessing data in zip - Index out of range pythoneer 24 13,154 Mar-15-2018, 06:19 PM
Last Post: buran
  "List index out of range" for output values pegn305 3 5,408 Nov-26-2017, 02:20 PM
Last Post: heiner55

Forum Jump:

User Panel Messages

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