python format string from dictionary