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 aforloopif …:: the starting line of anifconditional and blockelse:: the starting line of anelseconditional and blockelif …:: the starting line of anelifconditional 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 inforloopsenumerate(): enableforloops that iterate through indices and values at the same time