Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.
Start 7-day trial →
⚡
← Courses
›
Python Foundations
›
Module 7 · Advanced standard library
›
logging vs print
quiz
147 / 174
🇺🇸
EN
▼
↗
Share
⋯
More
+100 XP
📋
Task
📖
Theory
🤖
AI Help
Task
📝 **Question:** Why prefer \`logging\` over \`print\` in production code? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
🎯 Quiz
Question
📝 **Question:** Why prefer \`logging\` over \`print\` in production code? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
A
print is faster and uses less CPU than logging in tight loops
B
print is removed in Python 3.12+, leaving logging as the only option
C
logging has levels, can be redirected to files/syslog, and adds timestamps/module info automatically
D
print writes directly to disk while logging only buffers in memory
Submit answer
💬 Discussion
Be the first to ask a question or share a tip.
Sign in
to join the discussion. Reading is free.
Loading discussion…