Write a loop in python that can get the first 10 categories in python.
Display on the first 10.
![In [20]: import newspaper In [21]: cnn_papernewspaper.build(http://www.cnn.com) In [46]: for article in cnn_paper.articles: print(article.url) In [28]: for category in cnn_ paper.category_urls(): print(category) http://www.cnn.com/more http://www.cnn.com/asia http://www.cnn.com http://www.cnn.com/accessibility http://www.cnn.com/world http://www.cnn.com/opinions http://www.cnn.com/business http://collection.cnn.com http://www.cnn.com/election https://money-cnn.com http://www.cnn.com/style http://www.cnn.com/transcripts http://www.cnn.com/politics http://www.cnn.com/middle-east http://ww.cnn.com/europe http://www.cnn.com/health http://www.cnn.com/entertainment http://www.cnn.com/vr http://www.cnn.com/uk http://tours.cnn.com http://www.cnn.com/travel http://ww.cnn.com/videos http://cnn. İt http://www.cnn.com/australia http://www.cnn.com/africa http://www.cnn.com/americas http://www.cnn.com/us](http://img.homeworklib.com/questions/3b9a4160-8935-11eb-8066-218ba590b638.png?x-oss-process=image/resize,w_560)
Please find the code below.
CODE
============
# first get the categories
categories = cnn_paper.category_urls()
# now find the minimum of categories length and 10
# if there are less than 10 categories, print all of them
length = min(10, len(categories))
# now, print categories upto length
for i in range(length):
print(categories[i])

Write a loop in python that can get the first 10 categories in python. Display on...