What does a * b amount to if a and b are tuples?
3 Likes
If a and b are tuples then a * b will throw an error since a tuple can not be multiplied to another tuple.
TypeError: can't multiply sequence by non-int of type 'tuple'
Answered By
1 Like
Can you change an element of a sequence? What if a sequence is a dictionary? What if a sequence is a tuple?
What does a + b amount to if a and b are tuples?
What does a + b amount to if a is a tuple and b is 5?
Is a string the same as a tuple of characters?