Solutions in python