Using webbrowser module to use Google Maps
<p>i'm just new to python and i want to ask a simple question.<br>
what's the difference between using this code:</p>

<pre><code>    import webbrowser, pyperclip, sys        

    chrome = "C:/Program Files/Google/Chrome/Application/chrome.exe %s"

    def location_finder():
        output = input('Type the place you want to find!\n')

        webbrowser.get(chrome).open('https://www.google.com/maps/place/' + output)

    location_finder()
</code></pre>

<p>and this code:  </p>

<pre><code>    import webbrowser, pyperclip, sys  

    if len(sys.argv) &gt; 1:
        address = ' '.join(sys.argv[1:])
    else:
        address = pyperclip.paste()  

    webbrowser.open('https://www.google.com/maps/place/' + address)
</code></pre>

<p>The diffrent is:</p>

<ol>
<li>With the first one, using target browser is <code>chrome.exe</code> and the second is using the default browser.</li>
<li>The first code using import from built in function <code>input</code> and the second code <code>sys.argv</code>is automatically a list of strings representing the arguments (as separated by spaces) on the command-line. The <code>sys.argv[1:]</code> get everything after the script name.</li>
</ol>

python module sys pyperclip