5
Question Question 5
Are the following two assignments same ? Why / why not ?
1.
T1 = 3, 4, 5
T2 = ( 3, 4 , 5)
T3 = (3, 4, 5)
T4 = (( 3, 4, 5))
Answer
- T1 and T2 are same. Both are tuples. We can exclude/include the parentheses when creating a tuple with multiple values.
- T3 and T4 are not same. T3 is a tuple where as T4 is a nested tuple.