def get_day_type(info):
day_type = (info[info.find("(")+1:info.find(")")])
holiday = ["Sun", "Sat"]
if day_type not in holiday:
day_type = ("weekday")
return day_type
else:
day_type = ("weekend")
return day_type
The problem that it´s printing the type of the first day only and ignore the rest. for example:
print(get_day_type("Normal: 2May2022(mon), 3May2022(tues), 18Mar2021(Sun)"))
it only prints:
weekday
But I want my output to print all types of days. for example :
weekday
weekday
weekend
Note: I need to follow the same format of info input:
Which is ==>clientType: 12May1995(mon), 10May1995(tues), ........etc