Beginner
Clean and split an email address
raw_email holds " Ravi.Kumar@Example.COM \n", as typed into a form. Make three variables:
email is the cleaned address: no spaces or newline at the ends, all lower case. username is the part before the @. domain is the part after it. (partition("@"), from Topic 3.2, cuts a string at the first @.) Then print ravi.kumar at example.com using an f-string with username and domain.
What Check tests
emailisravi.kumar@example.comusernameisravi.kumardomainisexample.comraw_emailis unchanged andemailis not typed in- The program prints
ravi.kumar at example.com
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
main.py
Sign in to run your code.
Output
Press Run to see what your program prints.