Once problem solved in Python