Professional Documents
Culture Documents
##SYMBOLS##
###########
~ (tild sign)
$ (dollar sign)
^ (caret sign)
# (octothorpe/pound/hash/mesh sign)
+ (plus sign)
- (minus sign)
* (astrick sign)
/ (forward slash or divide sign)
\ (backward slash)
% (percent sign or modulus sign)
< (less-tan sign)
> (greater-than sign)
<= (less-tahn-equal sign)
>= (greater-than-equal sign)
= (single-equal sign)
== (double-equal sign)
' (single inverted commas or singlequotes)
" (double nverted commas or doublequotes)
. (dot or period)
( ) (parentheses)
, (comma)
_ (underscore)
? (question mark)
: (colon)
! (exclamatary sign)
####################
##Escape Sequences##
####################
Escape
What it does
\\
\'
\"
\a
\b
\f
\n
\N{name}
ly)
\r
\t
\uxxxx
\Uxxxxxxxx
\v
\ooo
\xhh
Backslash (\)
Single- quote (')
Double- quote (")
ASCII bell (BEL)
ASCII backspace (BS)
ASCII formfeed (FF)
ASCII linefeed (LF)
Character named name in the Unicode database (Unicode on
ASCII carriage return (CR)
ASCII horizontal tab (TAB)
Character with 16- bit hex value xxxx (Unicode only)
Character with 32- bit hex value xxxxxxxx (Unicode only)
ASCII vertical tab (VT)
Character with octal value oo
Character with hex value hh
########
##CODE##
########
Code
What it does
print
print out the data in screen
%s
repalce string
%d
replace number
%f
replace float
%.2f
float precise till 2 decimal place
raw_input()
takes raw data provided by user /* eg. data1 = raw_inpu
t() i.e. take any raw string
data2 = int(raw_input()) i.e. take raw data and convert it into integer
data2 = float(raw_input()) i.e. take raw data and convert it into float
data2 = double(raw_input()) i.e. take raw data and convert it into double
*/
import
open(f)
ile in read mode