python format code for string