Created
March 25, 2018 01:40
-
-
Save jennyonjourney/fbb81aeed8189d686e409bb2a8e74c1e to your computer and use it in GitHub Desktop.
Python - funtion3
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
def fn1(aa,bb): #매개변수 | |
a=77 | |
bb= 3333 | |
cc= 100 #지역변수 | |
print("fn1:", aa,bb,cc,a) | |
def fn2(): | |
global a | |
a = 9999 | |
print("fn2():",a) | |
def fn3(): | |
print("fn3()") | |
return 8888 | |
def fn4(aa): | |
aa[1]=45678 | |
print("fn4():",aa) | |
a=10 #일반변수 | |
d=30 | |
arr=[2,4,6,8] | |
fn1(4444,d) | |
fn2() | |
fn4(arr) | |
d=fn3() | |
print("main d:",d) | |
print("main a:",a) | |
print("main arr:", arr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment