(Dec-20-2018, 12:02 PM)albry Wrote: so I understand, with the first {} in the line that is calling from the day in my total_days list? and the second {} is calling from my week in the total_weeksNo, it's not calling... It's string formatting.
{}
is a place-holder. Actual value comes from arguments of .format()
. With f-strings in python 3.6+ it's even more convenient and natural.Check
https://docs.python.org/3/library/stdtyp...str.format
and
https://docs.python.org/3/library/string...ing-syntax
(Dec-20-2018, 12:02 PM)albry Wrote: And every time a new value for 'rain' in input by the user, it will add a new element into the list 'daily_rain'?
yes, that is correct
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs