Skip to content

Instantly share code, notes, and snippets.

@dariogabriel113
Created April 12, 2019 16:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariogabriel113/a15f0f9fd964c878bb397a3d49a6e3da to your computer and use it in GitHub Desktop.
Save dariogabriel113/a15f0f9fd964c878bb397a3d49a6e3da to your computer and use it in GitHub Desktop.
Variables and Types
mystring = "hello"
myfloat = 10.0
myint = 20
# testing code
if mystring == "hello":
print("String: %s" % mystring)
if isinstance(myfloat, float) and myfloat == 10.0:
print("Float: %f" % myfloat)
if isinstance(myint, int) and myint == 20:
print("Integer: %d" % myint)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment