5/14/2020 1:56:46 AM
Check out the output of the 4th line. You will understand yourself..
Alen Antony nyyc question & ofcourse we can form nested tuple like nested lists
👇👇 Here's your corrected code, check it
You can build nested tuples, but not with the multiplication operator.
t1 = 0, 1
t2 = t1, t1
Here is how you can achieve the output you asked:
Tibor Santa Why can't we do this with Multiplication operator
Will you tell me?
Plz check my code again
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 your code works too.
The multiplication of list and tuple works consistently in Python.
print((1,) * 5) # tuple of 5
print( * 5) # list of 5
mutible is tuple
Why can't we form a nested tuple , like nested lists?
Well that's my question?
Learn Playing. Play Learning
Send us a message