Sir me ne paython ki programing likhi jese courses me bataya tha juyter me par run nahi ho rahi he kucha bhi out put nahi ata he. Kucha error bhi show nahi kara rahe to kya karu sir please help me
Please Send your code
Bro, we don’t modify tuples directly.
use list() to convert a tuple to a list, then use insert() to insert the values, and lastly use tuple() to convert the list to a tuple.
like
T1 = (1,2,3,4,5)
L1 = list(T1)
L1.insert(2,“soni”)
T1 = tuple(L1)
T1
==> (1, 2, ‘soni’, 3, 4, 5)