@jugisto and @omz
Thanks to both of you! :D
All three ways work, but not for all things.
Just to make sure I understand, in the following code:
spam = 123
knight = 2
def rubber():
gulcup = 6
def chicken():
global knight, parrot
knight = 42
parrot = knight/2
'spam', 'knight', and 'parrot' are global variables while 'gulcup' (pronounced gill-cup, incase you don't get the reference) is a local variable to the function 'rubber()'.
Do note that I do not define parrot until the function 'chicken()'. Based on my experimentation this is fine. If I'm wrong about this (or anything above really) let me know.
Again, thanks for the help (and speedy response. I wish I was that fast)
Cubbarooney
Edit: Also, how do you get the code into those yellow boxes? Are my quotation marks interfering? I took them out now just in case. Take that back, I just noticed that (when I pressed edit) that the quotation marks changed to html