The function below takes one parameter: a list of strings (string_list). Complete the function to return a new list containing o
nly the strings from the original list that are less than 20 characters long. For this question, you'll first want to create an empty list. Then, you'll want to visit every element of the original list checking to see if it is short. You'll append the short strings to your new list. Finally, return the new list.
- Create a function called short_strings that takes one parameter, string_list
- Create an empty list called short_list to hold the strings that are less than 20 characters
- Initialize a for loop that iterates through the string_list. Check if there are strings that are less 20 characters in the string_list. If found, put them in the short_list