New rules for scope in a function?

Steve Gronicus at SGA.Ninja
Mon Feb 18 12:30:20 EST 2019


I have been programming for more years than I want to admit and believe that I have a good understanding when it comes to the Scope of Variables when using functions. Are the rules different when using python?

It looks as if I have to pass all variables to and from the function before it works.  Are variables used in the main program not also visible for use within the function?  Do these variables have to be declared as global?

Steve


Footnote:
Ultrasound Technician Asks Pregnant Woman If She’d Like To Know Baby’s Name
 



More information about the Python-list mailing list