Python Forum
How to put the items of one list in new generated lists
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to put the items of one list in new generated lists
#1
Hello.

I would like to know if it is possible to create for example 100 lists automatically,
so that I can use list1, list2, list3, ... list100

Thank you for your help.
Reply
#2
it's possible but you should not create variable names dynamically. Use proper data structure like list or dict.
What would be the content of these lists?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating list of lists from generator object t4keheart 1 123 Nov-13-2020, 04:59 AM
Last Post: perfringo
  Count number of occurrences of list items in list of tuples t4keheart 1 108 Nov-03-2020, 05:37 AM
Last Post: deanhystad
  How do i make a new lists out of an list ozezn1 1 159 Oct-28-2020, 10:19 PM
Last Post: Gribouillis
  concatenating 2 items at a time in a python list K11 3 161 Oct-21-2020, 09:34 AM
Last Post: buran
  List index out of range error while accessing 2 lists in python K11 2 256 Sep-29-2020, 05:24 AM
Last Post: K11
  Comparing items from 2 lists of dictionaries illwill 7 242 Sep-14-2020, 10:46 PM
Last Post: bowlofred
  Select the other of 2 items in a list Clunk_Head 7 448 Sep-01-2020, 05:27 PM
Last Post: Clunk_Head
  Removing items from list if containing a substring pythonnewbie138 2 353 Aug-27-2020, 10:20 PM
Last Post: pythonnewbie138
  list indices must be integers or slices, not lists error djwilson0495 2 345 Aug-27-2020, 06:13 PM
Last Post: deanhystad
  Print the number of items in a list on ubuntu terminal buttercup 2 420 Jul-24-2020, 01:46 PM
Last Post: ndc85430

Forum Jump:

User Panel Messages

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