Some bits of code from an intro python class