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
  deleting select items from a list Skaperen 13 389 Oct-11-2021, 01:02 AM
Last Post: Skaperen
  Getting All Items From A List knight2000 4 280 Sep-25-2021, 12:56 AM
Last Post: knight2000
  sorting a list of lists by an element leapcfm 3 260 Sep-10-2021, 03:33 PM
Last Post: leapcfm
  behavior list of lists roym 5 426 Jul-04-2021, 04:43 PM
Last Post: roym
  Feed List items with Integer euras 9 1,004 May-19-2021, 07:45 PM
Last Post: snippsat
  List of lists - merge sublists with common elements medatib531 1 921 May-09-2021, 07:49 AM
Last Post: Gribouillis
  Sort List of Lists by Column Nju 1 676 Apr-13-2021, 11:59 PM
Last Post: bowlofred
  Parse String between 2 Delimiters and add as single list items lastyle 5 894 Apr-11-2021, 11:03 PM
Last Post: lastyle
  Sum of list items tristanfermat 2 697 Feb-06-2021, 12:04 PM
Last Post: tristanfermat
  Creating list of lists from generator object t4keheart 1 819 Nov-13-2020, 04:59 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