A programing question
Hello!
I would like to define a procedure, which puts values in a dictionary:
def put:
u={}
u[Cathy]=3232556
u[John]=4256342
Now if I am outside the procedure, I cannot use the values of u's... Is there a method for that outside the procedura I can use these specific u's?
def put:
u={}
u[Cathy]=3232556
u[John]=4256342
put
print u[Cathy]
Traceback (click to the left of this block for traceback)
...
SyntaxError: invalid syntax
Many Thanks!
Note that it should be "def put()", and the function call should be "put()". You're missing parentheses in both places.