solutions in python