KnowledgeBoat Logo
|

Computer Science

How is an empty tuple created ?

Python Tuples

8 Likes

Answer

There are two ways of creating an empty tuple:

  1. By giving no elements in parentheses in assignment statement.
    Example:
    emptyTuple = ()
  2. By using the tuple function.
    Example:
    emptyTuple = tuple()

Answered By

4 Likes


Related Questions