0
Why create an empty tuple "tp=()" if I can't assign values to it later on? What useful function could I get out of an empty tuple?
3 Respostas
+ 1
It could be a replacement for None where a tuple is needed.
0
But can't I assign None where a tuple is needed?
0
You could in many situations, but there are some cases that it's more convenient to specify an empty tuple or list -- like as a default value for a function parameter where you expect a tuple.