Python usage for homework