Show Menu

Python Sheet Cheat Sheet by

Function

str()
create string
int()
create intege­r,n­umber without decimal
float()
change to decimal
len()
length of string
input()
use can insert info.
print()
show,print the result
#
commen­t,s­ingle line
"­"­"...."""
commen­t,many line
 

string concat­enate

"­xx"
inside quotation = string
"­F"+"A­"
string combined = "­FA"
"­6"
interger inside quotation = string

Calcul­ation

+
plus int, or concat­enate
-
minus,­int­,float using only
*
multip­lic­ation
'strin­g'*10
string will be appears ten time.
**
power of....
%
modulo, remainder
 

Operation

==
equal to, not =
>=
greater than or equal to
<=
smaller than or equal to
!=
not equal to
>
greater than
<
less than

If,eli­f,else

If
beginning
elif
use after if, only run when if not match
else
everything not match = this will run

Download the Python Sheet Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/wealth_python-sheet.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.