Keyboard Input in Python
You've encountered an issue reading keyboard input in Python using the code:
<code class="python">nb = input('Choose a number') print('Number%s \n' % (nb))</code>
This code doesn't function because:
<code class="python">try: mode = int(input('Input:')) except ValueError: print("Not a number")</code>
The above is the detailed content of How to Resolve Keyboard Input Issues in Python?. For more information, please follow other related articles on the PHP Chinese website!