9
Last seen 3 years ago
Member for 3 years, 6 months, 29 days
Difficulty Normal
📸 IG: 3scapePhotos
Good solution, but if you'd like to return a positive number, then you can just use abs(). So rather than having an if statement, you'd just have:
return abs(date1-date2).days
More
Well, I guess I could have just used datetime.date to convert the dates! :)
More
Interesting solution, as are many of your others. Would be great if they were commented for newer coders.
More
Good solution, but would get crazy long if more stressful words were added. :)
More
Thanks for the note about '-', I didn't know it was '#' for Windows. Too bad it's not one cross-platform format. I resorted to using f-string with date.day
More