0
Why python documentation have written optional argument like str.endswith(suffix[,start[,end]])?
Why there are square brackets When we actually write like a.endswith('a',1,-2)
1 Antwort
+ 4
It's just to show that they are optional and may be omitted.
You may call the function like
a.endswith('a')
Or
a.endswith('a', 1)
Or
a.endswith('a', 1, -2)
Depending on how you need to use the function.