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
  Getting All Items From A List knight2000 4 113 Yesterday, 12:56 AM
Last Post: knight2000
  sorting a list of lists by an element leapcfm 3 192 Sep-10-2021, 03:33 PM
Last Post: leapcfm
  behavior list of lists roym 5 364 Jul-04-2021, 04:43 PM
Last Post: roym
  Feed List items with Integer euras 9 877 May-19-2021, 07:45 PM
Last Post: snippsat
  List of lists - merge sublists with common elements medatib531 1 795 May-09-2021, 07:49 AM
Last Post: Gribouillis
  Sort List of Lists by Column Nju 1 611 Apr-13-2021, 11:59 PM
Last Post: bowlofred
  Parse String between 2 Delimiters and add as single list items lastyle 5 791 Apr-11-2021, 11:03 PM
Last Post: lastyle
  Sum of list items tristanfermat 2 637 Feb-06-2021, 12:04 PM
Last Post: tristanfermat
  Creating list of lists from generator object t4keheart 1 747 Nov-13-2020, 04:59 AM
Last Post: perfringo
  Count number of occurrences of list items in list of tuples t4keheart 1 714 Nov-03-2020, 05:37 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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