title: to find whether its day or night using time() module in python
body: <p>I started to write</p>
  
  <pre><code>import time
  localtime = time.localtime()
  print(localtime)
  </code></pre>
  
  <p>but the localtime gives nine attributes </p>
  
  <pre><code>time.struct_time(tm_year=2018, tm_mon=7, tm_mday=31, tm_hour=22, 
                   tm_min=32, tm_sec=41, tm_wday=1, tm_yday=212, tm_isdst=1)
  </code></pre>
  
  <p>I want to find whether its am or pm in python by comparing hours:min:sec with the local time. Please suggest</p>