def remove_duplicates(numbers): oneofeach= for number in numbers: if number not in oneofeacch: oneofeach.append(number) return oneofeach print remove_duplicates([2,2,2,2])
I don't understand why this doesn't work. It returns "global name 'oneofeach' is not defined".
I'm completely new to coding so I have no idea what a globalname is(a web search results in an explanation which uses concepts I don't yet understand, as I have only learnt from codecademy up til this point).
can someone explain?