title: Resolve schedule conflicts using python
body: <p>so I have the input of n users schedules, I want to form a new schedule that shows times <strong>Union</strong></p>
  
  <p>this is the input</p>
  
  <blockquote>
    <p>['08:00-08:50', '09:00-09:50', '10:00-10:50', '11:00-11:50',
    '11:00-12:15', '12:00-12:50', '12:00-13:15', '13:00-13:50',
    '14:00-15:15', '15:30-18:10']</p>
  </blockquote>
  
  <p>The output should be like this</p>
  
  <blockquote>
    <p>['08:00-08:50', '09:00-09:50', '10:00-10:50', '11:00-13:50',
    '14:00-15:15', '15:30-18:10']</p>
  </blockquote>
  
  <p>That what i have tried so far</p>
  
  <pre><code>if start_currenttime &lt; start_oldtime and end_currenttime &gt;= start_oldtime:
      start=start_currenttime
      flag=1
  
      if end_currenttime&gt;end_oldtime:
          end=end_currenttime
  
  if start_currenttime &gt;= start_oldtime and start_currenttime &lt;= end_oldtime and end_currenttime &gt; end_oldtime:
      flag=1
      end=end_currenttime
  
  if flag:
       return str(start)+"-"+str(end)
  else: return "-1"
  </code></pre>