C859 Python
f1 = open("/my_path/my_file.text", "r") - answer✔✔to open and read a file
f1 = open("/my_path/my_file.text", "w") - answer✔✔to open and write a file (all previous
material discarded)
f1 = open("/my_path/my_file.text", "a") - answer✔✔to open and add to a file
f1.read() - answer✔✔read a file into a string
f1.write("hello!") - answer✔✔writes to a file
f1.readline() - answer✔✔reads next line
f1.close() - answer✔✔closes a file (must always close a file!)
with open("/my_file...etc) as f: - answer✔✔opens, allows work, and automatically closes a file
timedelta - answer✔✔time library function to calculate time amounts
from datetime import timedelta - answer✔✔grabs timedelta from the datetime library
import datetime as dt - answer✔✔imports a library as a specified variable
datetime.date.today().month - answer✔✔to print current month (aka .day or .year for those)
beautiful soup - answer✔✔HTML parsing library
NumPy - answer✔✔scientific computing, matrices, array creation library
pandas - answer✔✔data manipulation and analysis library
pillow (PIL) - answer✔✔work with and manipulate images; python imaging library
pyglet - answer✔✔multimedia / gaming creation library
pytz - answer✔✔time zone data library
pip install ____________ import _______________ - answer✔✔to install and import a library
into your code