SHARE
TWEET

Untitled

a guest Feb 21st, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def long_strings(a):
  2.     new_list =[]
  3.     i=0
  4.     while i < len(a):
  5.         if len(a[i])>=5:
  6.             new_list.append(a[i])
  7.            
  8.         i+=1
  9.     return new_list
  10.          
  11. print(long_strings(['Hello','Goodbye','Sam']))
  12. print(long_strings(['Ace','Cat','Job']))
  13. print(long_strings([]))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top