Overview:
- For a timedelta instance, the function repr() returns a string containing the constructor invocation which is quantitatively equivalent to the original parameter values.
Example:
# Example Python program that prints longestTennisMatch = timedelta(hours=11, minutes=5) twentyFourPlus = timedelta(hours=24, minutes=10) |
Output:
Longest tennis match: datetime.timedelta(seconds=39900) More than 24 hours: datetime.timedelta(days=1, seconds=600) |