Complete the code to create a figure and axes for subplots.
fig, ax = plt.[1](1, 2)
The plt.subplots() function creates a figure and a set of subplots (axes).
Complete the code to plot a line chart on the first subplot.
ax[[1]].plot(x, y1)Index 0 refers to the first subplot in the axes array.
Fix the error in the code to set the title of the second subplot.
ax[[1]].set_title('Second Plot')
The second subplot is at index 1 in the axes array.
Fill both blanks to create subplots with 2 rows and 1 column and plot on the first subplot.
fig, ax = plt.subplots([1], [2]) ax[0].plot(x, y)
To create 2 rows and 1 column of subplots, use plt.subplots(2, 1).
Fill all three blanks to create a dictionary comprehension that maps words to their lengths only if length is greater than 3.
lengths = { [1]: [2] for [3] in words if len([1]) > 3 }The dictionary comprehension uses word as key, len(word) as value, and iterates over word in words.
