Q:

Write a Python program to find the list of words that are longer than n from a given list of words

0

Write a Python program to find the list of words that are longer than n from a given list of words.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def long_words(n, str):
    word_len = []
    txt = str.split(" ")
    for x in txt:
        if len(x) > n:
            word_len.append(x)
    return word_len	
print(long_words(3, "The quick brown fox jumps over the lazy dog"))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now