Cheatography
https://cheatography.com
Function
str() |
create string |
int() |
create integer,number without decimal |
float() |
change to decimal |
len() |
length of string |
input() |
use can insert info. |
print() |
show,print the result |
# |
comment,single line |
"""....""" |
comment,many line |
|
|
string concatenate
"xx" |
inside quotation = string |
"F"+"A" |
string combined = "FA" |
"6" |
interger inside quotation = string |
Calculation
+ |
plus int, or concatenate |
- |
minus,int,float using only |
* |
multiplication |
'string'*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,elif,else
If |
beginning |
elif |
use after if, only run when if not match |
else |
everything not match = this will run |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment