Created
March 25, 2018 01:41
-
-
Save jennyonjourney/aaa2da9bb0a42f5c1820f05423974744 to your computer and use it in GitHub Desktop.
Python - function practice2
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
ppp="" | |
def fn1(): | |
global ppp | |
pre = ppp | |
ppp+="\t" | |
a=10 | |
print(pre+"fn1() 시작",a) | |
fn2(); | |
print(pre+"fn1() 끝",a) | |
def fn2(): | |
global ppp | |
pre = ppp | |
ppp += "\t" | |
print(pre+"fn2() 시작") | |
fn3(); | |
print(pre+"fn2() 끝") | |
def fn3(): | |
global ppp | |
pre = ppp | |
ppp += "\t" | |
print(pre+"fn3() 시작") | |
print(pre+"fn3() 끝") | |
fn1() | |
#세미콜론으로 서로 다른 함수를 이끌어오는것 | |
#지역변수는 공유가 불가능함. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment