Added Python code (with creating testing)