Simplify counting and appending to a list
I think the issue was by ths following , You can do this in two lines using
collections.Counter (basically a special dict designed for counting things)
and list comprehensions (a more concise syntax for writing simple
loops).Here's how I'd do it.
Date : November 29 2020, 01:01 AM , By : Hamith Eduardo Palac