|
+ Search |
|
Aug 2nd, 2006 13:44
Reed O'Brien, Antonis Chatzidakis,
What is a simple database? A flat file? and array? CSV? As a list of dicts? >>> moviDB = [mov1, mov2, mov3, mov4] >>> for mov in moviDB: print mov['title'], mov['year'] Code 46 2003 The Last American Hobo 1967 Jabberwocky 1977 Riding the Rails 1997 # Delete the third entry >>> del moviDB[2] >>> for mov in moviDB: print mov['title'], mov['year'] Code 46 2003 The Last American Hobo 1967 Riding the Rails 1997