Problem Description
We had discussed about filter
. Let's try a question using it.
You are given an integer N followed by N email addresses. Your task is to print a list containing only valid email addresses in lexicographical order.
Valid email addresses must follow these rules:
Input Format
The first line of input is the integer N, the number of email addresses.
N lines follow, each containing a string.
Output Format
Output a list containing the valid email addresses in lexicographical order. If the list is empty, just output an empty list, [].
Example Input
3 sara@scaler.com brian-23@scaler.com brute_54@scaler.com
Example Output
['brian-23@scaler.com', 'brute_54@scaler.com', 'sara@scaler.com']