Python Forum
Trouble displaying items from lists
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble displaying items from lists
#6
Because you only delete things from Nicknames, so Names has more elements than Nicknames and you are using an index of Names to iterate things in Nicknames.

Incidentally, keeping "parallel arrays" like this is a well-known anti-pattern (you problem above is exactly one of the frequent pitfalls) and you should really be using a single array of "aggregates" that contain the Nickname, Name, and other information for each person in the address book.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
RE: Trouble displaying items from lists - by Ofnuts - May-18-2017, 06:06 AM
RE: Trouble displaying items from lists - by Ofnuts - May-18-2017, 01:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QUERY on Looping and creating lists as items within dictionaries ajayachander 3 2,431 Mar-26-2020, 02:03 PM
Last Post: ajayachander
  Trouble in lists erfanakbari1 2 2,385 Feb-26-2019, 08:46 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

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