I'm still very new to Python. I'm working on my assignment but I still do not understand how the find() method work when extracting emails. The purpose of the function is to extract the company of the email (i.e., everything after the @ sign but before the .) using the find() method.
extract_company("[email protected]") should return "uber"
So I understand that find(subtr, start, end). And I know how it should work, but in only one condition. However, this asked to find the company name in between @ and .
This is the code I have been working so far but it still gives me an assertionerror
def extract_company(email): return email.find('@' and '.')