I am a beginner, so please be kind. I'm using Beautiful Soup to parse through some html. I have gotten to where i found this a tag
a_tag = <a href="sicc2020/results?pid=31022">S<span class="notCompact">hakira</span> Mirfin</a>
I would like to get "S" "hakira" and "Mirfin" out of this string. However when I use the .string function, it just says none. I can get the 'hakira' part, but i can't get the "S" or "Mirfin".
print(a_tag)
>><a href="sicc2020/results?pid=31022">S<span class="notCompact">hakira</span> Mirfin</a>
print(a_tag).string
>> None
print(a_tag).find('span').string
>>hakira
Any help would be very appreciated!
Thank you.