Polyglot CheatSheet - Tuple

Updated: 2018-06-26

Python

Create an empty tuple

>>> t = ()
>>> type(t)
<class 'tuple'>

Compare the following 2, the difference is the comma(,)

>>> t = ("python")
>>> type(t)
<class 'str'>

>>> t = ("python",)
>>> type(t)
<class 'tuple'>