Complete the code to create a figure and axes using plt.subplots.
fig, ax = plt.[1]()The plt.subplots() function creates a figure and axes objects together.
Complete the code to plot a line on the axes object.
fig, ax = plt.subplots() ax.[1]([1, 2, 3], [4, 5, 6])
The ax.plot() method draws a line plot on the axes.
Fix the error in the code to set the title of the axes.
fig, ax = plt.subplots() ax.set_[1]('My Plot Title')
The method ax.set_title() sets the title of the plot.
Fill both blanks to create a dictionary comprehension that maps words to their lengths if length is greater than 3.
lengths = {word: [1] for word in words if len(word) [2] 3}The dictionary comprehension maps each word to its length if the length is greater than 3.
Fill all three blanks to create a dictionary comprehension that maps uppercase words to their values if the value is greater than 0.
result = { [1]: [2] for k, v in data.items() if v [3] 0 }This comprehension creates a dictionary with keys as uppercase versions of original keys and values where the value is positive.