Advertisement
Blessing988

Untitled

Feb 21st, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. def long_string(string_list):
  2.  
  3.     new_list = [ ]
  4.  
  5.     for string in string_list:
  6.         if len(string)>=5:
  7.             new_list.append(string)
  8.     print(new_list)
  9.  
  10. long_string(["Hello", "Goodbye", "Sam"]) #Example the argument must be a list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement