πŸ“Š Python
Q. What is the purpose of `*args` in function definitions?
  • (A) To define static arguments
  • (B) To allow variable-length positional arguments
  • (C) To return multiple values
  • (D) To handle keyword arguments
πŸ’¬ Discuss
βœ… Correct Answer: (B) To allow variable-length positional arguments

Explanation: `*args` allows a function to accept any number of positional arguments.

Explanation by: Mr. Dubey
`*args` allows a function to accept any number of positional arguments.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
43
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate