hello everyone,
I did the following exercise as in the tutorial but it gave an error.
age=22
message = “eligible” if age >= 18 else message = “not eligible”
print(message)
PS E:\python tut\Helloworld> & C:/Users/nzd.digital/AppData/Local/Programs/Python/Python311/python.exe “e:/python tut/Helloworld/app.py”
File “e:\python tut\Helloworld\app.py”, line 2
message = “eligible” if age >= 18 else message = “not eligible”
^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant ‘==’ or ‘:=’ instead of ‘=’?
PS E:\python tut\Helloworld>
where the problem is?