Initialization of frequency | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Initialization of frequency

Why freqs initialized as {} an not as = 0

17th Nov 2016, 5:36 AM
‏‪kouty‬‏
‏‪kouty‬‏ - avatar
1 Answer
+ 4
It will output an error if you try to do 0, because it used the .default method
13th Apr 2017, 10:09 AM
MrCoder
MrCoder - avatar