Add solution 2 in python