Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
All Array Index
#1
In the example below, how do I list all (index numbers) of the existing elements of the array because using the index () without passing one or more arguments generates an error: TypeError: index expected at least 1 argument, got 0. Remembering that I need to list all indexes !

letter = ['a', 'e', 'i', 'o', 'i', 'u']
output = letter.index()
print(output)
Reply


Messages In This Thread
All Array Index - by JohnnyCoffee - Feb-26-2021, 05:45 AM
RE: All Array Index - by buran - Feb-26-2021, 05:53 AM
RE: All Array Index - by JohnnyCoffee - Feb-26-2021, 06:33 AM
RE: All Array Index - by ndc85430 - Feb-26-2021, 06:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  change array elements dependent on index SchroedingersLion 1 2,239 Nov-22-2019, 06:25 AM
Last Post: scidam

Forum Jump:

User Panel Messages

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