Last active
December 26, 2015 05:59
-
-
Save akreer135/7104429 to your computer and use it in GitHub Desktop.
all sytaxes so far in python.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What I learned in python... | |
P.S. dont run this file, its not an actual file. | |
--------------------------------------------------------------------------------------- | |
1. print - prints or types out a statement. | |
2. # - allows you to write comments that do not interfear with the script | |
3. Math symbols: | |
+ adds numbers | |
- subtracts numbers | |
* multiplies numbers | |
/ divides numbers | |
< less than sign | |
> greater than sign | |
<= less than or equal to | |
>= greater than or equal to | |
% returns the remainder | |
= equals | |
'' or "" - allows you to type something without it messing with the script | |
False = not true | |
True = not false | |
\t = tabs | |
\n = like <br\> | |
\\ = inserts backslash | |
\' = one single qoute | |
\" = one double qoute | |
raw_input() = input from the user during the script | |
from = in a certain file | |
import = imports a module from the python libraries | |
open = opens a file | |
truncate = deletes a file | |
def = defines a function | |
read = reads a file | |
read_line = reads a specific line | |
elif = else if, used sometimes during raw_input | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment