family= # index from the very beginning, the sequence of each element is: 0 1 2 3 4 5 ... NOTE it starts from 0 ! family 'mom' family 'sis' family 'dog' list ( family ) # index from backwar ...
# double or single quotes 'hey yy' 'hey yy' hey yy 'hey yy' he's a handsome man he's a handsome man 'he ' s a handsome man' he's a handsome man 'he sai ...
import math # math.floor(x) returns the floor of x as a float, the largest integer value less than or equal to x. math.floor(9.2) 9.0 # math.sqrt(x) returns the square root of x. math.sqrt(81) 9.0 # math.pow(x,y) returns x raised to the power y ...
import urllib2 # the urllib2 module defines functions and classes which help in opening URLs (mostly HTTP) in a complex world - basic and digest authentication, redirections, cookies and more. url1 = 'http://www.oldbaileyonline.org/print.jsp?div=t17800628-33' response1 = ur ...
# send information to the Command Output print hello world # creat a new file and write it f = open('helloworld.txt','w') # creat a txt file in the working directory. w stands for write. when using w, the program will overwite whatever might ha ...