Create your own for/else


Traceback (most recent call last):
File "python", line 1, in
NameError: name 'ps4' is not defined

Not sure why it doesnt know what ps4 is. It is in a list, does it need to be defined?


variables always need to be defined, are you sure you don't want to use strings for the different gaming consoles?


am i not declaring that gamingsystems is a list containing ps4, ps3, ps2, xbox, tomato?


yes, but ps4, ps3, ps2, xbox and tomato are undefined variable. Now read my answer again:


got it!

thank you for not just giving me the answer. Made me really think and now i will remember it.


that is my definition of help, you're welcome :slight_smile: