I would like to add a "default value" to an input().
Something like this:
>>> x = input("Enter a number: ", value="0")
Enter a number: 0
So that the user can edit it, like the value attribute in html <input>
I tried using pyautogui:
import pyautogui
def input_value():
x = input("Enter a number: ")
pyautogui.hotkey("0")return x
But naturally it doesn't work because pyautogui.hotkey() is called after input().
Is there any way to do this?