weatherToday = "sunny"
weatherTomorrow = "cloudy"
weatherForecast = "Today is going to be " + weatherToday + " and tomorrow will be " + weatherTomorrow + "."
currentTemp = 25
wetaherForecast = weatherForecast + " The current temperature is {:d}.".format(currentTemp)
print(weatherForecast)
为什么这个得出来的不是Today is going to be sunny and tomorrow will be cloudy. The current temperature is 25. 而是Today is going to be sunny and tomorrow will be cloudy.