Question: Python You were browsing a list of users registered on your site when you noticed that some email addresses might be duplicated Every address consists

Python

Python You were browsing a list of users registered on your site

when you noticed that some email addresses might be duplicated Every address

You were browsing a list of users registered on your site when you noticed that some email addresses might be duplicated Every address consists of a local name and a domain name, separated by the @ sign. For example, in the address "duplicate@example.com", "duplicate" is a local name and "example.com" is a domain name. For the purposes of this task, let's define two ways of formatting an email address: . If you add dots (".') between some characters in the local name part of an email address, it will be forwarded to the equivalent address without dots. For instance, email addresses of the form "dupli.cate@example.com" "dupli...cate@example.com" will all be forwarded to "duplicate@example.com". Please note that this doesn't work for domain names, so "duplicate@exa.mple.com.net" is different from "duplicate@example.com.net" If you add a plus (+) in the local name, everything after the plus sign will be ignored. This allows certain emails to be filtered; for example, "duplicate+work@example.com" will be forwarded to "duplicate@example.com" It is possible to use both of these formatting methods at the same time. You are given a list of addresses. We collect them together into groups, with each group containing emails that are equivalent according to the above rules. For example, given L ("abe example . com", "x@example . com", "x@exa.mple . com", "ab+1 @example . con. y@example. com. @ example. com", "y@example. com] there are four groups: ['y@example.com", "y@example.com", "y@example.com]. Your goal is to find the number of groups which contain more than one element - in this example, there are two such groups

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!