0

How can I press enter to exit. And if no input to prompt the "There must be at least one player!" message?

print("Player name or <ENTER> to end:", end="") if(players == 0): player1 = input() if(player1 == ""): print("There must be at least one player!") if(player1 == ""): exit() else: players += 1

2nd Sep 2020, 8:03 AM
SWL
1 Answer
0
It's impossible, to read input you must press enter. And if you already have another idea for blank input. How would you exit by enter?
7th Sep 2020, 11:29 AM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar