Код: Выделить всё
def inputWithDefault(text:str, default):
result = input(f"{" " * int(len(text))}{default}\r{text}")
return default if not(result is type(default)) else result
Код: Выделить всё
File "main.py", line 2
result = input(f"{" " * int(len(text))}{default}\r{text}")
^
SyntaxError: f-string: expecting '}'
Подробнее здесь: https://stackoverflow.com/questions/790 ... tion-input