Human: How to get only div with id ending with a certain value in Beautiful Soup? Assistant: 
Here is some code to beautifulSoup select 'div' elements with an id attribute value ending with sub-string '_answer' in HTML parsed string `soup`

soup.select('div[id$=_answer]')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.