python

Parameter/ Argument

jyee 2023. 11. 8. 14:25
728x90
반응형

functions with  inputs 

 

Parameter 와 Argument의 차이 

 

def my_function(something) :

def my_function(something) : 
    #Do this with something
    #Then do this
    #Finally do this

my_function(123)

 

something  =  123

       ↓                ↓

parameter       argument 

 

 argument는 함수로 전달되고  호출되는 데이터를 의미하고 

parameter는 그 데이터의 이름으로 함수 안에서 그 변수가 사용될 쓰인다.

 

즉, 

argument는 그 데이터의 실제 값 

parameter는 함수에 전달된 데이터의 이름 

728x90
반응형