New course! Every coder should learn Generative AI!
Try a free lesson0
Which of the expressions is not valid in python?
True While False: break x = ‘129 * 5’ + ‘3x-seventeen’ when 3 > 1: print (“foo”)
1 Answer
0
there is no 'when' keyword in python
https://docs.python.org/3.7/reference/lexical_analysis.html#keywords
https://docs.python.org/3/genindex-all.html#W
you can use if instead