Are there any uses of the empty tuple in Python?

前端 未结 3 1852
南旧
南旧 2020-12-18 18:25

Is there any other purpose (besides being there because it needs to be) the empty tuple may have? Or: what would you use the empty tuple for? If anything. I just can\'t find

3条回答
  •  自闭症患者
    2020-12-18 19:07

    Tuples represent arbitrary sequences of values. When you need to describe an empty sequence of values, you can use an empty tuple.

提交回复
热议问题