The Following html sample produces different results depending on the text style format Here is the sample when on one line
card = """
<ul class="wrapper--inline-block float--left margin-top--15 padding-left--20 font--weight-300"><li><span class="font--weight-500">Minimum Qualification:</span> Bachelor</li><li><span class="font--weight-500">Experience Level:</span> Graduate trainee</li><li><span class="font--weight-500">Experience Length:</span> 1 year</li></ul>
"""
Output:
Minimum Qualification: BachelorExperience Level: Graduate traineeExperience Length: 1 year
And when the html sample is formatted
card = """
<ul class="wrapper--inline-block float--left margin-top--15 padding-left--20 font--weight-300">
<li><span class="font--weight-500">Minimum Qualification:</span> Bachelor</li>
<li><span class="font--weight-500">Experience Level:</span> Graduate trainee</li>
<li><span class="font--weight-500">Experience Length:</span> 1 year</li>
</ul>
"""
The Output
Minimum Qualification: Bachelor
Experience Level: Graduate trainee
Experience Length: 1 year
Question is, how can make the first case produce the desired output like case two. Here is my current code
qualifications= BeautifulSoup(card, "html.parser")
print(qualifications.getText())