Skip to content

Instantly share code, notes, and snippets.

@Pierian-Data
Created March 1, 2018 17:10
Show Gist options
  • Save Pierian-Data/fe805b11d6dc41ae447a1bafc7906bed to your computer and use it in GitHub Desktop.
Save Pierian-Data/fe805b11d6dc41ae447a1bafc7906bed to your computer and use it in GitHub Desktop.
def myfunc(x):
if x == True:
# print('Hello')
return 'Hello'
elif x == False:
# print('Goodbye')
return 'Goodbye'
@Opt-Jay
Copy link

Opt-Jay commented May 28, 2024

def my_num(x = 17):
if x:
return('Hello')
elif not x:
return('Goodbye')

my_num()

@kevin17-86
Copy link

`def check_num(num):
if num:
return 'Hello'
else:
return "Goodbye"

num = 7 > 5
print(check_num(num))`

@darkh00k
Copy link

def myfunc(a):
if a == True:
return 'Hello'
elif a == False:
return 'Goodbye'

myfunc(True)

@haneenmuhammed2005
Copy link

def my_function():
if x==True:
return 'Hello'
elif x==False:
return 'Goodbye'

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