python - Using a Value declared within a function, outside of the function -


if defined function this:

def plop(plop):     ploplop = 1234     if plop == ploplop:          print "i plopped" 

how take ploplop outside of scope of function?

you return it, , capture on other side.

def plop(plop):     ploplop = 1234     if plop == ploplop:          print "i plopped"     return plopplop  someval = plop(1235) 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -