Week 3 glossary

Week 3 glossary#

Here are some python syntax features and functions that you should know after this week’s class:

Syntax feature#

  • for in …: : the starting line of a for loop

  • if …: : the starting line of an if conditional and block

  • else: : the starting line of an else conditional and block

  • elif …: : the starting line of an elif conditional and block

Also note the use of indentation in for loop and if-elif-else statements

Built-in python functions:#

  • range(): create a range object, useful in for loops

  • enumerate(): enable for loops that iterate through indices and values at the same time