Expressing current time with natural language
Python supports double-ended inequalities:

End_str = ['at night', 'in the morning','in the afternoon','in the evening']

if 0 &lt;= hour &lt; 6:
    Ending = End_str[0]
elif 6 &lt;= hour &lt; 13:
    Ending = End_str[1]
elif 13 &lt;= hour &lt; 19:
    Ending = End_str[2]
elif 19 &lt;= hour &lt; 24:
    Ending = End_str[3]


I've changed 23 to 24 for consistency and rearranged the members of End_str.  I don't see how hour should be anything other than an integer, so I've removed the casts.

if minute == 0 or minute == 00 is redundant, since 00 is exactly the same as 0.

I would expect noon and midnight to be handled as special cases.