What would be the quickest way to make sure the following is trusted:
email = "foobar@gmail.com"
trusted = [".co.uk", ".com", ".net", ".edu", ".ac.uk"]
What would be the quickest way to make sure the following is trusted:
email = "foobar@gmail.com"
trusted = [".co.uk", ".com", ".net", ".edu", ".ac.uk"]
you can use filter for these sorts of things:
list(filter(lambda x: email.endswith(x),trusted))