Answer the question
In order to leave comments, you need to log in
Local variable referenced before assignment. Why?
Hello. I wrote the code, for some reason it writes an error that the variable was called before the
code created it
import collections
answeres = {'fefewd':'cheburek', 'frgte':'cheburek'}
ansc = collections.Counter()
for value in answeres.values():
ansc[value] += 1
UnboundLocalError: local variable 'ansc' referenced before assignment
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question