Python Script: Search websites names from random text and open them in new browser window

This is does the following:

1. Opens Notepad  ( Yes this script runs only on windows ). You should paste the text and save it.
2. This Uses regular expression to search websites name form text.
3. Then all websites are open simultaneously on the DEFAULT web browser in separate tabs.

import webbrowser
import string
import subprocess
import fileinput
import sys
import re

open('sites.txt', 'w').close()['notepad.exe', 'sites.txt'])
for line in fileinput.input('sites.txt', inplace=True):
    line = line.replace("\n", " ")

f = open('sites.txt')
text1 =


websites = re.findall(r'(\S+[.]com)', text1) # this is the RE
data = ', '.join(websites)
data1 = data.replace(",", "")

words = data1.split()
for word in words:
    url = 'http://' + word