Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Python
/
Python fundamentals
What does configured_port or 8000 return when configured_port is 0?
from Python fundamentals
Python 3.14
beginner
2 min
What does configured_port or 8000 return when configured_port is 0?
8000, because 0 is false and or returns its second operand
0, because configured_port is an integer
False, because or always returns bool
It raises ValueError because ports cannot be zero
Check
Ask AI about this kata
Report an error
next kata
Which try suite best handles conversion of one user-supplied quantity?
Quiz
A new version is available
Reload