Created
February 8, 2019 05:20
-
-
Save Ventsislav-Yordanov/d7b64b57642a925fdc259c1e5a32f69b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subject = "programming" | |
def change_subject(new_value): | |
"""Change the value fo the global variable subject""" | |
global subject # Use subject in global scope | |
subject = new_value | |
print(subject) | |
change_subject("machine learning") | |
print(subject) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment