I have a list of strings (As below format)
['email', 'go', 'a', 'instance', 'at', 'boo', 'email', 'message', 'message', 'instance', 'at', 'hello']
How can i eliminate anything under two characters long?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use a list comprehension:
new_list = [k for k in old_list if len(k) >= 2]List comprehensions are sometimes very convenient and easy to use, you can read more here and here.