0
Which is not a reserved python keyword used for controlling program flow?
If, then, break or elif? Why??
2 Answers
+ 2
Among the ones you named, 'then' is not a keyword in Python.
Why not? That's hard to answer! Every programming language has its own tools, and some are existent in one language but not in another.
When would you need a 'then'? Maybe in if-clauses? 'If this then that?'
in Python you for example write:
if 1+1 == 2:
print('Oh, really? ;)')
elif 1+1 == 3:
print("Now I'm surprised...")
else:
print("Something's broken.")
It's all logical even without a 'then'.
+ 7
I guess here 'then' is not a keyword in python rest all are keyword in python for control flow
https://www.programiz.com/python-programming/keyword-list