Created
February 28, 2023 12:12
-
-
Save TomoG29/1c6eac88e80b2b459c856c202cb63792 to your computer and use it in GitHub Desktop.
This file contains 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
Sample_Var = 0 | |
def Process1(): | |
Sample_Var = 1 | |
def Process2(): | |
global Sample_Var | |
Sample_Var = 1 | |
def Process3(): | |
global Sample_Var = 1 | |
Process1() | |
print(f"1点目:{Sample_Var}") | |
# 1点目:0 | |
Process2() | |
print(f"2点目:{Sample_Var}") | |
# 2点目:1 | |
Process3() | |
print(f"3点目:{Sample_Var}") | |
# エラー |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment