Skip to content

global var #817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Create global var
global variable
  • Loading branch information
nic00asia authored Oct 31, 2020
commit 800e6d11524f739cde4fd33286d3c28fcaaa7cf8
10 changes: 10 additions & 0 deletions global var
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def f():
global s
print(s)
s = "Look for Python Section"
print(s)

# Global Scope
s = "Python is great!"
f()
print(s)