I am trying to calculate the number of days b/w two given days.The problem that I am facing is when the first day comes late as compared to the second day. Example-If the first day is Saturday and the second one is Monday so the number of days that exists b/w them should be 3 but my code fails to do this.
a="saturday monday 1 2"
f=a.split(" ")
l=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]
g=abs(l.index(f[0])-l.index(f[1]))+1
print(g)