A Python Cheat Sheet
|
print()
|
Show information that you want on the screen
|
|
int()
|
Change number to be number integer
|
|
float()
|
Change number to be decimal number
|
|
input()
|
Gain information from user
|
|
str()
|
A list of number, letter and symbols
|
|
len()
|
The length of the string
|
|
#
|
Comment, no effect
|
|
Variable
|
Hold a value and can be change
|
|
String
|
A list of character such as number, letter and symbols
|
|
Integer number
|
Whole number/counting number
|
|
Float number
|
The number in decimal
|
|
Syntax
|
Grammar/Structure of lauguage
|
|
Modulo
|
Find the remainder
|
|
Boolean
|
True/False
|
|
==
|
equal to
|
|
!=
|
no equal to
|
|
<
|
less than
|
|
>
|
more than
|
|
<=
|
less than or equal to
|
|
>=
|
more than or equal to
|
|
%
|
Modulo, Find the remainder
|
|
string + string
|
Combine together
|
|
string + number
|
CRASH!
|
|
number + number
|
Addition (Math)
|
|
string * number
|
Combine that string
|
|
string* string
|
CRASH!
|
|
number * number
|
Multiply (Math)
|
|
string ** string
|
CRASH!
|
|
number ** number
|
Exponent (Math)
|
|
string ** number
|
CRASH!
|
|
False or True
|
True
|
|
False and True
|
False
|
|
True and False
|
False
|
|
True and True
|
True
|
|
False or False
|
False
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.