0
Python input()-or question.
Consider this code: for i in range(k): a = input() or 5 Suppose that there is no input given for this code (just pressing the enter button when the input prompt appears). If k is 1, a is equal to 5. However, if k is greater than 1, then EOFError is raised. Why does this happen, even though I had used the 'or' there?
1 ответ
+ 1
Jan Markus Thanks for answering my question. I'll try it in PyDroid.