Error message:
alarm = f"{alarm_hour}:{alarm_minute:02}:{alarm_am_pm}"
ValueError: '=' alignment not allowed in string format specifier
I don't know why this code is giving the error as I have used the same before in the 's program and it's working fine. Here's the code.
TIME = f"{current_hour}:{current_minute:02}:{current_second} {am_pm}"
But whenever I remove :02 from alarm_minute it works as I wanted to show number in 2 digits. I'm confused what's wrong with the code. Both are almost identical but one is giving error other's don't.