runtime
122 / 500
question 122 Comprehensions · easy

Sign-ups counted twice

The launch dashboard says five people signed up, but support knows of three: some people submitted the form twice, once with different capital letters or a stray space. unique_signups cleans every address and then counts them. Find why it still over-counts and fix it.

Functionunique_signups(emails)
emailsa list of email addresses as typed
Returnshow many different people signed up: addresses that match after removing end spaces and lower-casing count once
Keepthe function name and that it returns a whole number
Examples
callunique_signups(['nora@fastmail.com', 'Nora@Fastmail.com', 'jamal.walker62@icloud.com ', 'grace_walker29@yahoo.com', ' jamal.walker62@icloud.com'])returns3
callunique_signups(['theo@gmail.com'])returns1
callunique_signups(['a@x.com', 'b@x.com'])returns2

Loading your progress…

Sign-ups counted twice — Python practice · Runtime