Advertisements
Advertisements
प्रश्न
What is the difference between default Parameters and positional parameters in Python?
अंतर स्पष्ट करें
Advertisements
उत्तर
| Default Parameters | Positional Parameters | |
| 1. | These are parameters that have a predefined value assigned in the function header. | These are parameters that must be passed in the correct order during a function call. |
| 2. | If no value is provided by the caller, the function uses the default value. | The caller must provide a value for every positional parameter; otherwise, an error occurs. |
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
