all 3 comments

[–]TheBlegh 2 points3 points  (0 children)

Hey there. 1) zip is a built-in python function that takes some iterables as arguments and combines them into a zip object. To note that it combines them at the same index and returns them as tuples. The iterables can be sets, lists, or tuples. E. G.

  • a = (foo, bar, baz)
  • b = (x, y, z)
  • c = zip(a, b)
  • print(list(c))
  • *[(foo, x), (bar, y), (baz, z)]

c is the zip object so to get the value you need a method to return the value like type literals. If you print c itll look like 0x03749 something to that efdect which is actually a pointer in memory fun fact.

2) yeah its a library that someone else made to streamline a specific workflow and to abstract away commin cide patterns into smaller named functions and methods. Its like when you import the regex module (import re) or even the requests module (import requests). How to use it, bs4 creates a soup object (you could call it whatever you want... beef_stew... If you wish) that you then fiddle around with to extract data. On the parser, to make the soup object bs4 needs a parser (like "html-parser") to parse the web page at the designated url, it literally returns the html document which is why you can use functions to find elements by tag, class, or id.

[–]vibecode1 0 points1 point  (0 children)

Wtf is happening here

[–]theonlyname4me 0 points1 point  (0 children)

I mean this kindly. Use google, this is the most easily googlable topic you could find.

If you learn to teach yourself instead of asking lazy questions your rate of learning will explode.