Skip to content

Instantly share code, notes, and snippets.

@Pierian-Data
Created March 1, 2018 17:19
Show Gist options
  • Select an option

  • Save Pierian-Data/dd645bb5881653b73015f5956e613243 to your computer and use it in GitHub Desktop.

Select an option

Save Pierian-Data/dd645bb5881653b73015f5956e613243 to your computer and use it in GitHub Desktop.
def myfunc(*args):
out = []
for num in args:
if num%2==0:
out.append(num)
return out
@Uche-James
Copy link

def myfunc(*args):
return [ arg for arg in args if arg%2==0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment