[Solved] How to split date and time from a string in Python 3?

[ad_1]

Check this code.

string="2017-01-20T21:55:00Z"

print string[0:10] 

Output:

2017-01-20

string="2017-01-20T21:55:00Z"

print string[11:19]

Output:

21:55:00

2

[ad_2]

solved How to split date and time from a string in Python 3?