Some TA's problem finished in python