I’m guessing that date is some sort of shortcut for Get-Date. (I hadn’t seen it before, but it only took a second to see what it’s doing).
The key here is that date is producing a DateTime object. Now — when you tack on the -f (format string operator), you are converting that DateTime to a String.
PS C:\> date
Thursday, December 3, 2020 9:56:30 PM
PS C:\> (date).GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True DateTime System.ValueType
PS C:\> date -f 'dd/MM/yyyy'
03/12/2020
PS C:\> (date -f 'dd/MM/yyyy').GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True String System.Object
So, if you want to input it into your python function, get rid of the -f operator, it’s completely unnecessary at this point.
Good luck!
David F.