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
  How to parse and group hierarchical list items from an unindented string in Python? ann23fr 0 171 Mar-27-2024, 01:16 PM
Last Post: ann23fr
  HOW TO USE C# GENERATED DLL davide_vergnani 2 1,629 Jun-12-2023, 03:35 PM
Last Post: davide_vergnani
  Why do I have to repeat items in list slices in order to make this work? Pythonica 7 1,316 May-22-2023, 10:39 PM
Last Post: ICanIBB
  List all possibilities of a nested-list by flattened lists sparkt 1 911 Feb-23-2023, 02:21 PM
Last Post: sparkt
  Finding combinations of list of items (30 or so) LynnS 1 866 Jan-25-2023, 02:57 PM
Last Post: deanhystad
  user input values into list of lists tauros73 3 1,062 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  returning a List of Lists nafshar 3 1,056 Oct-28-2022, 06:28 PM
Last Post: deanhystad
  Creating list of lists, with objects from lists sgrinderud 7 1,610 Oct-01-2022, 07:15 PM
Last Post: Skaperen
  For Word, Count in List (Counts.Items()) new_coder_231013 6 2,563 Jul-21-2022, 02:51 PM
Last Post: new_coder_231013
  How to get list of exactly 10 items? Mark17 1 2,480 May-26-2022, 01:37 PM
Last Post: Mark17

Forum Jump:

User Panel Messages

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