KnowledgeBoat Logo

Computer Science

How is an empty tuple created ?

Python Tuples

7 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

3 Likes


Related Questions