Take random 10 element from terms_used

My code worked in 20 mins ago, after I rerun all code, the error showed, How did it happen?

Screen Link: https://app.dataquest.io/m/210/guided-project%3A-winning-jeopardy/6/low-value-vs-high-value-questions

My Code:

terms_used_list=list(terms_used)

import random 
sample=random.sample(terms_used_list,10)
comparison_terms=sample

What I expected to happen:
10 elements show.

What actually happened:

ValueError: Sample larger than population

Error saying that you do not have enough data items in terms_used_list list to take 10 samples from it. terms_used_list may contain less than 10 items or empty list. So please check do you have enough data items in terms_used_list?

yes, I have more than 10 item in terms_used_list. I rerun it, it worked again. but after an hour, i rerun all the code, error showed again.

Okay it seems reproducible please upload your project notebook so i or someone can see the issue.

you can refer this to know “How to share your jupyter notebook”