Very good! Suppose our plane is delayed by 15 minutes. How can we update our time object?
datetime module objects are immutable. Once you create a time variable, you can't change any of its elements. What you can do is create a new time object based on an existing object. We do this using the
replace() function. Take a look:
fra_mad_scheduled = datetime.time(9, 30, 0)
fra_mad_actual = fra_mad_scheduled.replace(minute=45)
replace() function is used to copy an existing time object. Inside the parentheses, we specify the elements we want to replace:
microsecond. In this case, we only want to update the