Split and Combine Date
<p>I am trying to write a python script that will compare dates from two different pages. The format of date in one page is Oct 03 2016 whereas on other page is (10/3/2016). My goal is to compare these two dates. I was able to convert Oct to 10 but don't know how to make it 10/3/2016.</p>

<p>You should really be using the <code>dateutil</code> library for this.</p>

<pre><code>&gt;&gt;&gt; import dateutil.parser 
&gt;&gt;&gt; first_date = dateutil.parser.parse('Oct 03 2016')
&gt;&gt;&gt; second_date = dateutil.parser.parse('10/3/2016')
&gt;&gt;&gt; first_date
datetime.datetime(2016, 10, 3, 0, 0)
&gt;&gt;&gt; second_date
datetime.datetime(2016, 10, 3, 0, 0)
&gt;&gt;&gt; first_date == second_date
True
&gt;&gt;&gt; 
</code></pre>

python