tup1 = (‘Mega’) * 3
print(len(tup1))
This is because tup1 is not a tuple but a string. To make tup1 a tuple it should be initialised as following:
tup1 = (‘Mega’,)*3 # notice the “,” after ‘Mega’
tup1 = (‘Mega’) * 3
print(len(tup1))
This is because tup1 is not a tuple but a string. To make tup1 a tuple it should be initialised as following:
tup1 = (‘Mega’,)*3 # notice the “,” after ‘Mega’