Python Forum
Help with Logical error processing List of strings
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Logical error processing List of strings
#3
Ask yourself if you need to remove items from a list. I never do this. I build a new list that only contains the items I want to keep.

If you think you need to remove all items, for is the wrong choice for your loop.
while list_of_users:
    user = list_of_users.pop(0)
    # whatever
Reply


Messages In This Thread
RE: Help with Logical error processing List of strings - by deanhystad - Nov-27-2022, 01:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to read module/class from list of strings? popular_dog 1 483 Oct-04-2023, 03:08 PM
Last Post: deanhystad
  Trying to understand strings and lists of strings Konstantin23 2 774 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  problem in using int() with a list of strings akbarza 4 714 Jul-19-2023, 06:46 PM
Last Post: deanhystad
  Delete strings from a list to create a new only number list Dvdscot 8 1,552 May-01-2023, 09:06 PM
Last Post: deanhystad
  Splitting strings in list of strings jesse68 3 1,780 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Convert each element of a list to a string for processing tester_V 6 5,361 Jun-16-2021, 02:11 AM
Last Post: tester_V
  Greedy algorithms on logical problems Opensourcehacker 0 1,541 Nov-22-2020, 05:12 PM
Last Post: Opensourcehacker
  Strange syntax error with f-strings Askic 6 4,229 Oct-16-2020, 10:40 AM
Last Post: Askic
  Unable to bit shift and logical OR bytes and ints? MysticLord 7 7,043 Sep-01-2020, 03:31 PM
Last Post: deanhystad
  Basic logical errors cpopescu 3 2,069 Jun-03-2020, 11:30 AM
Last Post: menator01

Forum Jump:

User Panel Messages

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