Skip to content

Instantly share code, notes, and snippets.

@gunnarx
Created June 23, 2020 17:20
Show Gist options
  • Save gunnarx/f4e3551e69926855544ef518a4d9b0e7 to your computer and use it in GitHub Desktop.
Save gunnarx/f4e3551e69926855544ef518a4d9b0e7 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
units = [
"A",
"N.m",
"PS",
"UNIX Timestamp",
"V",
"celsius",
"cm",
"cm3",
"degrees",
... and so on
x = "min"
if x in units:
print("Yes, %s is in units" % x)
else:
print("No, %s is not in units" % x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment