create a formatted string in python