Create a program in Python that takes a URL as input and prints out all the links (href) that appear in the page.
Not applicable
import requests
from bs4 import BeautifulSoup

url = 'http://www.example.com'

html = requests.get(url).text
soup = BeautifulSoup(html, 'html.parser')

for link in soup.find_all('a'):
 print(link.get('href'))