domains(emails) returning the set of lowercase domains (the part after @) found in a list of email addresses, via a set comprehension.domains(['a@Gmail.com', 'b@yahoo.in', 'c@GMAIL.com'])
{'gmail.com', 'yahoo.in'}The two Gmail variants collapse after lowercasing.
email.split('@')[1] isolates the domain.
Braces instead of brackets make it a set comprehension.