Python Version of Lab2