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
  Feed List items with Integer euras 1 35 5 hours ago
Last Post: menator01
  List of lists - merge sublists with common elements medatib531 1 185 May-09-2021, 07:49 AM
Last Post: Gribouillis
  Sort List of Lists by Column Nju 1 278 Apr-13-2021, 11:59 PM
Last Post: bowlofred
  Parse String between 2 Delimiters and add as single list items lastyle 5 279 Apr-11-2021, 11:03 PM
Last Post: lastyle
  Sum of list items tristanfermat 2 372 Feb-06-2021, 12:04 PM
Last Post: tristanfermat
  Creating list of lists from generator object t4keheart 1 386 Nov-13-2020, 04:59 AM
Last Post: perfringo
  Count number of occurrences of list items in list of tuples t4keheart 1 360 Nov-03-2020, 05:37 AM
Last Post: deanhystad
  How do i make a new lists out of an list ozezn1 1 362 Oct-28-2020, 10:19 PM
Last Post: Gribouillis
  concatenating 2 items at a time in a python list K11 3 408 Oct-21-2020, 09:34 AM
Last Post: buran
  List index out of range error while accessing 2 lists in python K11 2 517 Sep-29-2020, 05:24 AM
Last Post: K11

Forum Jump:

User Panel Messages

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