Lesson 23 of 34
Default व Keyword Arguments
8 min 30 XP
Parameter ला default value द्या. Caller ने ती दिली नाही तर default वापरली जाते.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.Keyword arguments: values नावाने द्या, मग क्रम महत्त्वाचा राहत नाही. कोड वाचायलाही सोपा होतो.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.Default असलेले parameters default नसलेल्यांच्या नंतर यायला हवेत: def f(a, b=2) चालते, def f(a=1, b) error आहे.