import random random choice(['apple''pear''banana']'applerandom sample(range( ) sampling without replacement [ random random(random float random randrange( random integer chosen from range( the statistics module calculates basic statistical properties (the meanmedianvarianceetc of numeric dataimport statistics data [ statistics mean(data statistics median(data statistics variance(data the scipy project < internet access there are number of modules for accessing the internet and processing internet protocols two of the simplest are urllib request for retrieving data from urls and smtplib for sending mailfrom urllib request import urlopen with urlopen(for line in responseline line decode('utf- 'decoding the binary data to text if 'estin line or 'edtin linelook for eastern time print(linenov : : pm est import smtplib server smtplib smtp('localhost'server sendmail('soothsayer@example org''jcaesar@example org'"""tojcaesar@example org fromsoothsayer@example org beware the ides of march """server quit((note that the second example needs mailserver running on localhost dates and times the datetime module supplies classes for manipulating dates and times in both simple and complex ways while date and time arithmetic is supportedthe focus of the implementation is on efficient member extrac internet access