हिंदी

While defining a function in Python, the positional parameters in the function header must always be written after the default parameters. - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

While defining a function in Python, the positional parameters in the function header must always be written after the default parameters.

विकल्प

  • True 

  • False

MCQ
सत्य या असत्य

उत्तर

The statement is False.

Explanation:

In Python, positional parameters must always be written before the default parameters in a function header, not after. Python reads parameters left to right. Once a default value is provided, all the parameters must also have default values — otherwise, it gets confused during function calls.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2023-2024 (February) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×