Skip to content

Commit

Permalink
modify woongjoonchoi.github.io/_posts/Python/Scope and Name/2022-01-2…
Browse files Browse the repository at this point in the history
…3-Global-Scope.md

modify change global name example code
  • Loading branch information
woongjoonchoi committed Oct 27, 2023
1 parent 52c7f0d commit 11267a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions _posts/Python/Scope and Name/2022-01-23-Global-Scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,17 @@ first.X=88
```python
X = 99

def setX() :
def setX(num) :
global X
X = 88
X = num
# X = 88
```

```python
import first

first.setX()
num = 88
first.setX(num)
print(first.X)
```

Expand Down

0 comments on commit 11267a9

Please sign in to comment.