LearnPy Hub
← Modules & the Standard Library problems
Medium

Hours Between Two Moments

Read two date-times like 2026-01-01 08:30 (one per line). Print the difference in whole hours and leftover minutes, like 26 h 15 min.

Input

Two lines.

Output

One line.

Sample 1

Input
2026-01-01 08:30
2026-01-02 10:45
Output
26 h 15 min

Sample 2

Input
2026-01-01 00:00
2026-01-01 00:00
Output
0 h 0 min
solution.py
Output appears here
Hours Between Two Moments · Python practice problem · LearnPy Hub