How to split dates from weather data file
Question: I am new in python and i would greatly appreciate some help. I have data
generated from a weather station(`rawdate`) in the format `2015-04-26
00:00:48` like this

    
    
    Date,Ambient Temperature (C),Wind Speed (m/s)
    2015-04-26 00:00:48,10.75,0.00
    2015-04-26 00:01:48,10.81,0.43
    2015-04-26 00:02:48,10.81,0.32
    

and i would like to split them into `year` `month` `day` `hour` and `minute`.
My attempt so far is this:

    
    
    for i in range(len(rawdate)):
        x=rawdate[1].split()
        date.append(x)
    

but it gives me a list full of empty lists. My target is to convert this into
a list of lists (using the command `split`) where the new data will be stored
into x in the form of `[date, time]`. Then i want to split further using split
with "-" and ":". Can someone offer some advice?


Answer: 
    >>> from datetime import datetime
    
    >>> str_date = '2015-04-26 00:00:48'
    >>> datte = datetime.strptime(str_date, '%Y-%m-%d %H:%M:%S') 
    >>> t = datte.timetuple()
    >>> y, m, d, h, min, sec, wd, yd, i = t
    >>> y
    2015
    >>> m
    4
    >>> min 
    0
    >>> sec
    48
    

