0

Can sooner please explain this line

print("{0} - {1}%".format(char, round(perc, 2)))

5th Sep 2016, 4:04 AM
Lyn Dan
Lyn Dan - avatar
1 Resposta
+ 1
Perc is a variable passed to the function round - it will round it to 2 digits after the decimal point. {0} is a place holder for the first variable (char) and {1} is aplace holder for the rounded perc to the formatted string.
24th Mar 2017, 6:10 PM
SAMI Awad
SAMI Awad - avatar