[I just want to keep the years and not the numbers in present in the bracket.][1]
[This is my current output. I want to strip the data which is in the bracket and do this for all the data present in the list till the end][2]
[1]https://i.stack.imgur.com/4Q9Wg.png
[2]https://i.stack.imgur.com/SOVQO.png
Use .split() function.
.split()
striped_titles = titles.split(",")
So, now you can access each element from new list striped_titles
striped_titles
1.4m articles
1.4m replys
5 comments
56.9k users