Add solution in python for c-1