Analysis: You may have a string
s="SunMonTueWedThuFriSat"
, and slice a
substring s[n:n+3]
.
Enter a weekday (0-6): 2
The weekday abbreviation is Tue.
Enter a weekday (0-6): 5
The weekday abbreviation is Fri.
Enter a weekday (0-6): 0
The weekday abbreviation is Sun.