카테고리 없음

python 함수

억삼이 2018. 2. 8. 12:22
반응형

position argument, keyword argument


def test(a1, a2, a3):

print 'A1' , a1

print 'A2', a2

print 'A3', a3


test(a1='t1') # keyword argument

test('t1', 't2') # position argument

test('t1', a3='t3') # positon, keyword arguemtn

test(a3='t3', 't2') #invalid #keyword, position arguement

반응형