Answers for "if statement without if in python"

1

can we use else without if in python

In most of the programming languages (C/C++, Java, etc), the use of else statement has been restricted with the if conditional statements. But Python also allows us to use the else condition with for loops. The else block just after for/while is executed only when the loop is NOT terminated by a break statement
Posted by: Guest on June-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language