Fix the line

Report a typo

Imagine that you want to write a program that checks an email address input by a user. Now, your program is very simple: if the string contains the '@' sign, you want to return the string "Done!", otherwise, you should use the assert keyword and output the message "Try again!". This procedure is implemented in the following piece of code:

email = input()


def check_email(address):
    assert ['@' in address, 'Try again!']
    return 'Done!'


check_email(email)

However, there is one syntax inaccuracy in the code. Fix the line with the incorrect syntax and enter the fixed line in the text field below.

Do not add anything for optimization, you only need to fix the syntax error.

Enter a short text
___

Create a free account to access the full topic