From 411ffd8cab1e3ddbbae8216f1ff6d7c1e429e1b5 Mon Sep 17 00:00:00 2001 From: yashkumarjha12 <72943344+yashkumarjha12@users.noreply.github.com> Date: Thu, 6 Oct 2022 11:51:45 +0530 Subject: [PATCH] Create Find_the_list_of_words_that_are_longer_than_n_from_a_given_list_of_words.py --- ...s_that_are_longer_than_n_from_a_given_list_of_words.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Python/Find_the_list_of_words_that_are_longer_than_n_from_a_given_list_of_words.py diff --git a/Python/Find_the_list_of_words_that_are_longer_than_n_from_a_given_list_of_words.py b/Python/Find_the_list_of_words_that_are_longer_than_n_from_a_given_list_of_words.py new file mode 100644 index 0000000..7815802 --- /dev/null +++ b/Python/Find_the_list_of_words_that_are_longer_than_n_from_a_given_list_of_words.py @@ -0,0 +1,8 @@ +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"))