how to get all links text from a website python beautifulsoup

from bs4 import BeautifulSoup
import requests

response = requests.get('url')
all_links = response.find_all('a')  # this will return all links+text

Here is what the above code is Doing:
1. We’re using the requests library to get the HTML from the page.
2. We’re using BeautifulSoup to parse the HTML.
3. We’re using the find_all method to get all the links from the page.