when I swap return for print, I do not get all the same values back in my defined function.
Here is my code with print()
def seo():
sou = soup.findAll(class_ = 'rtf l-row')
for x in sou:
l = x.findAll('p')
s = x.findAll('h4')
for i in l:
lolz = i.text
print(lolz)
for j in s:
h = j.text
print(h)
Here is the exact same code with return:
def seo():
sou = soup.findAll(class_ = 'rtf l-row')
for x in sou:
l = x.findAll('p')
s = x.findAll('h4')
for i in l:
lolz = i.text
return lolz
for j in s:
h = j.text
return h
when I use return, I only get back the first line of code. Thanks!