BeautifulSoup: extract nth child in a list

i’m looking to extract “What i want” from an html list with BeautifulSoup.

<ul class="two-columns">
    <li class="two-columns_a">
        <span> Something1: </span><span class="red">What I want</span>
    <li class="two-columns_a">
        <span> Something2: </span><span class="red">What I want</span>
    <li class="two-columns_a">
    <span> Something3: </span><span class="red">What I want</span>

So far, I did something like this, but it returns both values between span tag.

data['something1'] ="li.two-columns_a")[0].text.strip() 
data['something2'] ="li.two-columns_a")[1].text.strip()
data['something3'] ="li.two-columns_a")[2].text.strip()

Thanks in advance for your help,


Assuming data is intended as a dictionary, you can try:

data= {}
for target in'ul.two-columns li.two-columns_a'):

Output should be:

{' Something1: ': 'What I want',
 ' Something2: ': 'What I want',
 ' Something3: ': 'What I want'}