We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Date and Time
- Time Delta
- Discussions
Time Delta
Time Delta
Sort by
recency
|
388 Discussions
|
Please Login in order to post a comment
Here is HackerRank Time Delta in python solution - https://programmingoneonone.com/hackerrank-time-delta-problem-solution-in-python.html
#!/bin/python3 from datetime import datetime import math import os import random import re import sys
Complete the time_delta function below.
def time_delta(t1, t2):
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')
t1 = datetime.strptime(t1, "%a %d %b %Y %H:%M:%S %z") t2 = datetime.strptime(t2, "%a %d %b %Y %H:%M:%S %z")