Aug-28-2019, 07:40 PM
input the entire string, strip and split
forexample, change:
forexample, change:
print(section.find('span', {'class':'ListItemFull_text__1DqPn'}).get_text())to
str1 = section.find('span', {'class':'ListItemFull_text__1DqPn'}.text.strip().split() for word in str1: print(word) # or print(word[3]) # for the fourth word.