- named parameter
- keyword argument
Function parameters can be named
examples/functions/named_params.py
def sendmail(From, To, Subject, Content): print('From:', From) print('To:', To) print('Subject:', Subject) print('') print(Content) sendmail( Subject = 'self message', Content = 'Has some content too', From = 'gabor@szabgab.com', To = 'szabgab@gmail.com', )
The parameters of every function can be passed either as positional parameters or as named parameters.