Python Forum
a list of lists of lists of ...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a list of lists of lists of ...
#1
a list is passed to a function. that list may be empty or contain some number of items. the items at some depth will be all the same type. the items may be lists just like the top list (may be empty, will have all items be the same type, may contain lists). multiple lists at the same level may have different sizes (including possibly empty).

given a depth number (0 means the top) i want to collect all items. 0 gets the given list itself. 1 gets all the items in the given list. the result is to be an iterator. if the requested depth exceeds the existing depth, raise an exception.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  common element in some lists Skaperen 4 2,432 May-23-2021, 10:57 PM
Last Post: Skaperen
  Multidimensional lists Ferdis 1 1,519 Jul-27-2020, 11:15 AM
Last Post: Larz60+
  shift operator on lists Skaperen 3 2,720 Sep-09-2018, 02:38 AM
Last Post: ichabod801
  Lists: concatenate vs. extend vs. chain buran 8 9,919 Oct-09-2017, 06:56 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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