print() — Python Technical Interview Questions & Answers

print()

print()

  • print() is built into Python. You do not import it. Freshers only need one honest call and the printed result — not a long definition.
  • print() — output: Hello Python then 21 Pune.
  • Wrong type often raises TypeError. Empty values matter for bool/all/any. Don’t mix print up with a similar name (sorted vs sort, int vs float).

Technical Interview Tip: Call print() once and say what prints.

Code Examples for print()

Example

# print()
print("Hello Python")
print(21, "Pune")

print() — output: Hello Python then 21 Pune.

How to Explain print() to an Interviewer

Explain print() as if you are teaching a junior — definition, then one tiny script.

print() is built-in — no import. One call + exact output.

What does the example print, and why?

print() — output: Hello Python then 21 Pune

What mistake do freshers make with print()?

Wrong type → TypeError.