Skip to content

Instantly share code, notes, and snippets.

@y56
Created January 27, 2020 09:55
Show Gist options
  • Save y56/567a1273d82db0c0fdb34b203d1ae5b6 to your computer and use it in GitHub Desktop.
Save y56/567a1273d82db0c0fdb34b203d1ae5b6 to your computer and use it in GitHub Desktop.
learn new python stuff
def ran_check1(num, low, high):
return int(num in range(low, high))
def ran_check2(num,low,high):
if num in range(low,high):
print('{num} is not in the range of {low} and {high}')
else:
print('{num} is not in the range of {low} and {high}')
ran_check1(1,2,3)
ran_check2(1,2,3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment