how to accept tuple in python code example
Example 1: tuples in python
my_tuple = ("hello")
print(type(my_tuple)) # <class 'str'>
# Creating a tuple having one element
my_tuple = ("hello",)
print(type(my_tuple)) # <class 'tuple'>
# Parentheses is optional
my_tuple = "hello",
print(type(my_tuple)) # <class 'tuple'>
Example 2: what are tuples in python
#A tuple is essentailly a list with limited uses. They are popular when making variables
#or containers that you don't want changed, or when making temporary variables.
#A tuple is defined with parentheses.