#!/usr/bin/env python3

import webbrowser, sys, pyperclip

sys.argv # ['mapit.py', '870','Valencia','St.']

#Check if command line arguments were passed:

if len(sys.argv) >1:
    #['mapit.py', '870','Valencia','St.'] --> '870 Valencia St.'
    address = ' '.join(sys.argv[1:])
    webbrowser.open(address)
else:
    address=pyperclip.paste()
    print(address)
    webbrowser.open('address')