← Back to Question List
Python Code Walkthrough #11
Conditional Expression In A Loop
📄 Code
Read carefully — what does this print?1for num in [3, 10, 7, 12]:2 label: str = 'big' if num > 8 else 'small'3 size: int = num * 2 if num < 5 else num4 print(num, label, size)