Skip to content

TT1 Data Structures

Allie Xiao edited this page Apr 5, 2022 · 3 revisions
  • Collection is a data structure that holds more than one value (Ex: list)
  • List is a class, has methods
  • How to access methods? use "." (Ex: .append)
  • Ex: infodb
  • Initializing DB as empty list, appending dictionary to list
  • Can access entries with 'get' or index value
  • For loop: doesn't require counter
  • While loop: requires counter
  • Recursive loop: requires counter
  • NOTE: need to use exit condition to make sure recursive loop eventually terminates
  • Use tester for all backend code

Clone this wiki locally