Your task is to create a Python script named host_check.py
that extracts the host from a given text string. The text string will be in the format of an email, and you need to extract the host part.
- The input text will always be in the format 'From [email] [other information]'. Example: 'From [email protected] Sat Nov 5 09:14:16 2023'
- Extract the host part from the email address.
- Save the extracted host in a variable named
host
. - Print the
host
variable.
Submit a file named host_check.py containing your Python script.
The autograder will run your script with different inputs to ensure it correctly extracts the host. Make sure your script follows the specified rules.
Do not explain the code in the file; the autograder will evaluate it based on its functionality.
Good luck!