BIODIVERSITY CAPSTONE PROJECT - INVESTIGATING PROTECTED SPECIES Chi-Squared Test for Significance

I got stuck, so I referred to the solution code for instruction #2 involving the chi-squared test. Here is the answer:

```
import codecademylib
import pandas as pd
from matplotlib import pyplot as plt
from scipy.stats import chi2_contingency
# Instruction 1
contingency = [[30, 146], [75, 413]]
# Instruction 2
pval = chi2_contingency(contingency)[1]
print(pval)
```

**My question:** For instruction 2, what does the [1] at the end of the formula do? Why is it needed? The code doesn’t run without it. Any help would be greatly appreciated.

-Michael