Structure representing time without date in Python -


What is the Python data structure to represent only hours and seconds without any other information, if not use In my case what is the best structure to do

Why not only datetime Use module and attributes for its relevant: datetime import datetime from

  my_time = '05: 43: 34 'my_time = datetime.strptime ('% H:% M:% S ', My_time)   

Then you just Ace They can work:

  gt; & Gt; & Gt; My_time.hour 5 >> & gt; & Gt; My_time.minute 43 & gt; & Gt; & Gt; My_time.second 34    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -