parsing_data/quickref.tex
author Amit Sethi
Tue, 09 Nov 2010 12:31:05 +0530
changeset 414 f76622c8cbd9
parent 331 e3136f576acb
permissions -rw-r--r--
Review of addition ipython
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     1
Splitting a string on whitespace:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     2
{\ex \lstinline|    str_var.split()|}
238
c507e9c413c6 Converted the parsing_data into new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     3
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     4
Splitting a string using a delimiter. Ex: ";" :\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     5
{\ex \lstinline|    str_var.split(";")|}
238
c507e9c413c6 Converted the parsing_data into new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     6
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     7
Stripping the whitespace around a string:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     8
{\ex \lstinline|    str_var.strip()|}
238
c507e9c413c6 Converted the parsing_data into new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     9
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    10
Converting a string or float to int:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    11
{\ex \lstinline|    int(var_name)|}
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    12
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    13
Converting a string or int into float:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    14
{\ex \lstinline|    float(var_name)|}
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    15