Skip to content

Instantly share code, notes, and snippets.

@Pierian-Data
Created March 1, 2018 17:12
Show Gist options
  • Save Pierian-Data/5c832d8e481557c12eab2565013baec4 to your computer and use it in GitHub Desktop.
Save Pierian-Data/5c832d8e481557c12eab2565013baec4 to your computer and use it in GitHub Desktop.
def myfunc(x,y,z):
if z:
# print(x)
return x
else:
# print(y)
return y
@Jarbo1225
Copy link

def myfunc(x,y,z):
if z ==5:
#print("x+y")
return x+y
else:
print("y+z")

result = myfunc(1,3,5)

4

@RogelioDaniel
Copy link

def myfunc(x,y,z):
if z == True:
return x
elif z == False:
return y

@shrutigitam
Copy link

def myfunc(x,y,z):
if z == 'food' :
print(x)
return x
else:
print(y)
return y
myfunc('nkem','nam','food')

@chiragsalvi
Copy link

def myfunc(x,y,z):
if z == True:
return x
else:
return y

@0xtpsn
Copy link

0xtpsn commented May 16, 2024

def myfunc(x,y,z): if z == True: return x else: return y

@kevin17-86
Copy link

def myfunc(x, y, z): if z: #print(x) return x else: #print(y) return y

@darkh00k
Copy link

def myfunc(x,y,z):
if z == True:
return x
else:
return y

myfunc('Hello','Goodbye',True)

@haneenmuhammed2005
Copy link

def myfun(x,y,z):
if z==True:
return x
else:
return y

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