Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created August 10, 2021 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/9d25d23e102f6fbb35c666d7dbbbaa7d to your computer and use it in GitHub Desktop.
Save amankharwal/9d25d23e102f6fbb35c666d7dbbbaa7d to your computer and use it in GitHub Desktop.
def remove_even(x):
for i in x[:]:
if (i % 2) == 0:
x.remove(i)
return x
a = [12, 15, 7, 9]
print(remove_even(a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment