Word / symbol | Explanation |
---|---|
print |
echos the content to the console |
< |
less than |
> |
greater than |
>= |
greater than or equal |
<= |
less than or equal |
= |
assigns value to variable |
== |
comparator, equal to |
%s |
Inserts string into |
%d |
Inserts decimal into |
%r |
displays raw or representative data into |
% |
selects the variable after the string |
\n |
newline escape character used in strings |
\t |
tabulator escape character |
raw_input() |
Query for input from console |
argv |
Argument variable, used to set variables from command line |
open() |
opens a file object |
open(file, 'w') |
opens a file with write permission |
read() |
reads a file object |
close() |
closes a file object |
truncate() |
trunkates a file object |
len() |
finds the length of an object |
def |
Creates a function |
def function_name(arguments): |
The first line of a function |
function_name(arguments) |
How to call an argument |
seek() |
Go to a line in a file object |
+= |
Increments a variable |