Question: Update file _ path and delim to read the text from data / tempest . txt and split its content into scenes. ( Note: delim

Update file_path and delim to read the text from data/tempest.txt and split its content into scenes. (Note: delim should be set to a pattern that matches the scene headers (Section 4.4.1.2)). Print the scenes identified in the play (e.g., "SCENE 1", "SCENE 2").
With the preset code:
#---Your code starts here---
file_path =
delim =
#---Your code stops here---
tempest_text = open(file_path, "r").read()
scene_texts = re.split(delim, tempest_text)
print("Scenes:", scene_texts[1::2])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!