I have variable d int.
d = int(input("1 - to enter expression; 2 - to enter text; 3 - to exit. "))
But if you do not enter a number then the program crashes with an error. To avoid this I write this:
d = (lambda x = input("1 - to enter expression; 2 - to enter text; 3 - to exit. "): int(x) if x.isdigit() else: 3)
but get an error
SyntaxError: invalid syntax.