Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. movies = ["The Holy Grail", 1975, "Terry Jones & Terry Gilliam", 91,
  2. ["Graham Chapman", ["Michael Palin", "John Cleese",
  3. "Terry Gilliam", "Eric Idle", "Terry Jones"]]]
  4. def ListCheck (ThingInList, Depth):
  5.     if isinstance(ThingInList, list):
  6.         for ThingInList2 in ThingInList:
  7.              ListCheck(ThingInList2, Depth+1)
  8.     else:
  9.         for tab in range(Depth):
  10.             print("\t", end='')
  11.         print(ThingInList)
  12.  
  13. ListCheck(movies,0)