I'm trying to write a line of code at ask the user for two inputs but can't figure out how to complete this
<h1>Why does this line of code not split the two</h1>

<pre><code>Lat1,long1 = input("Enter the Lat and Long of the source point separated by a comma eg 20,30").split()
</code></pre>

<p>By default using <code>split()</code> will only split on a space. You are asking the user to enter two entries separated by a <code>,</code>, so you will end up getting a</p>

<pre><code>ValueError: not enough values to unpack (expected 2, got 1)
</code></pre>

<p>To resolve this, you need to split on the identifier you are looking to split with. In this case it is a ',', so call <code>split</code> as <code>split(',')</code>:</p>

<pre><code>Lat1,long1 = input("Enter the Lat and Long of the source point separated by a comma eg 20,30").split(',')
</code></pre>

<p>Demo:</p>

<pre><code>&gt;&gt;&gt; Lat1,long1 = input("Enter the Lat and Long of the source point separated by a comma eg 20,30").split(',')
Enter the Lat and Long of the source point separated by a comma eg 20,3060,80
&gt;&gt;&gt; Lat1
'60'
&gt;&gt;&gt; long1
'80'
</code></pre>

<p>Here is the documentation on split:</p>

<p><a href="https://docs.python.org/3/library/stdtypes.html#str.split" rel="nofollow">https://docs.python.org/3/library/stdtypes.html#str.split</a></p>

python split