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
def fn1(): #매개변수x,리턴x | |
print("fn1()") | |
def fn2(a,b,c): #매개변수o,리턴x | |
print("fn2():", a,b,c, a+b+c) | |
def fn3(): #매개변수x,리턴o | |
print("fn3():") | |
return 100, 200, 300 | |
def fn4(a,b): | |
print("fn4():", a, b) | |
return a*b |
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
dic2 = {'키':157, | |
'나이':26, | |
'이름':'이은혜', | |
'성별':'여자'} | |
print(dic2) | |
print(dic2['나이']) | |
dic2 = {'키':157, | |
'나이':26, | |
'이름':'이은혜', |
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
arr1 = [11,22,33,44] | |
a = 10 | |
b = a | |
print("a:", id(a)) | |
print("b:", id(b)) | |
a = 20 | |
print("a:", id(a)) |
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
def fn1(arr): | |
hap=0 | |
for i in arr: | |
hap+=1 | |
print("fn1()",arr,hap) | |
fn1([11,22,33,44]) | |
# 이렇게 튜플이 아니면 넣을수 없다 -> fn1(11,22,33,44) | |
# 열거형은 맨 뒤에서 온다. |
NewerOlder