Write a script in Python to extract the title of a webpage from its HTML code.
html = "<title>This is page title</title>"
soup = BeautifulSoup(html, 'html.parser')
title = soup.find('title').text
print(title)