Added solution for Python