Python Code Using String To Measure