+ 1

Cant get what is the use of last line inside print()...plz can anone explain

for char in "abcdefghijklmnopqrstuvwxyz": perc = 100 * count_char(text, char) / len(text) print("{0} - {1}%".format(char, round(perc, 2)))

29th Feb 2020, 10:55 PM
Ana
2 Answers
+ 2
Thanks a lot
29th Feb 2020, 11:10 PM
Ana
+ 1
Okk but what for {0}-{1}% is being used here??
29th Feb 2020, 11:05 PM
Ana