SHARE
TWEET

Untitled

a guest Feb 17th, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var = int(input("Enter a limit: "))
  2. arr = []
  3. for i in range(var):
  4.      arr.append(int(input()))
  5.  
  6.  
  7. print("You entered: " ,arr)
  8.  
  9.  
  10. for i in arr:
  11.  
  12.     if (i % 2)!=0:
  13.         arr.remove(i)
  14.  
  15.  
  16. print(arr)
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