nerdexam
Python_Institute

PCEP-30-02 · Question #258

How many arguments can the print() function take?

The correct answer is C. Any number of arguments (including zero). Python's print() function accepts any number of arguments, including zero - calling print() with no arguments simply outputs a blank line, and you can pass as many comma-separated values as you like (e.g., print(1, 2, 3, "hello")). Why the distractors are wrong: A is close but…

Question

How many arguments can the print() function take?

Options

  • AAny number of arguments (excluding zero).
  • BNot more than seven arguments.
  • CAny number of arguments (including zero).
  • DJust one argument.

How the community answered

(58 responses)
  • A
    3% (2)
  • B
    7% (4)
  • C
    76% (44)
  • D
    14% (8)

Explanation

Python's print() function accepts any number of arguments, including zero - calling print() with no arguments simply outputs a blank line, and you can pass as many comma-separated values as you like (e.g., print(1, 2, 3, "hello")).

Why the distractors are wrong:

  • A is close but wrong because it excludes zero - print() with no arguments is perfectly valid.
  • B is an invented limit; Python imposes no seven-argument cap on print().
  • D is wrong because passing multiple values is one of print()'s most common uses.

Memory tip: Think of print() as a megaphone - you can speak nothing (silence = blank line), one word, or an entire sentence. No limit, no minimum.

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice