Blog Archives

Poetry with Python

example of a Python for loopTo paraphrase Shakespeare in the digital age, a for loop in any other language would iterate as well. From the perspective of Distant Reading (Moretti), today’s digitally literate scholars and students need to be able to understand some basic coding (indeed, what is a for loop, anyway??). Python is a great place to start! This session will look at one example of writing and applying a Python script to a text file to highlight and track references to targeted key words (perhaps, “rose” and “sweet”). We can then graph these keywords using some of Python’s libraries. The coding will be very basic, but the insights will hopefully prove very valuable.