min() — Python Technical Interview Questions & Answers
min()
min()
- min() is built into Python. You do not import it. Freshers only need one honest call and the printed result — not a long definition.
- min() — output: 3.
- Wrong type often raises TypeError. Empty values matter for bool/all/any. Don’t mix min up with a similar name (sorted vs sort, int vs float).
Technical Interview Tip: Call min() once and say what prints.
Code Examples for min()
Example
# min()
print(min(3, 9, 4))
min() — output: 3.
How to Explain min() to an Interviewer
Explain min() as if you are teaching a junior — definition, then one tiny script.
min() is built-in — no import. One call + exact output.
What does the example print, and why?
min() — output: 3
What mistake do freshers make with min()?
Wrong type → TypeError.