pyassistant

Filter Strings by Length

Write a function that takes a list of strings as input and returns a new list containing only the strings that have a length greater than 5 characters.

Example:

Input:
['apple', 'banana', 'kiwi', 'orange', 'strawberry', 'pineapple']
Output:
['banana', 'strawberry', 'pineapple']

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.