return sum([index for index, item if item == n])
You could use range based loop which is more like traditional c loops.
whenever i have to use python at work, i always have this "wtf is python syntax" in my head 😂 totally understandable
how can anyone with some python knowledge not know enumerate??
@SamMeechWard