I was doing a coding challenge and noticed something weird with how arrays worked with modules (or more likely it's my own error).
pages = [*list of 5 webpages*]
final = []
for i in range(0,4):
page = requests.get(pages[i])
piece = page.text
final.append(piece)
print(''.join(final))
This code only joins 4 of the 5 webpages. Changing the range to 0,5 or len(pages) solves the problem. I was under the impression that 0,4 would include all the webpages in my list (5 of them) since indexing starts at 0.
for page in pages: page = requests.get(page)rangedoesn't include the "end" value, sorange(x, y)meansx, x+1, x+2, ..., y-2, y-1.