How to create an empty tuple in Python?

PythonServer Side ProgrammingProgramming

You can create empty tuple object by giving no elements in parentheses in assignment statement. Empty tuple object is also created by tuple() built-in function without any arguments

>>> T1 = ()
>>> T1
()
>>> T1 = tuple()
>>> T1
()
raja
Published on 08-Feb-2018 19:16:43
Advertisements