- We can apply + and * operators for tuple.
Concatenation Operator (+)
Example
Python
t1=(10,20,30)
t2=(40,50,60)
t3=t1+t2
print(t3)
Output
PowerShell
(10, 20, 30, 40, 50, 60)
Multiplication operator (*)
- multiplication operator also called repetition operator.
Example
Python
t1=(10,20,30)
t2=t1*3
print(t2)
Output
PowerShell
(10, 20, 30, 10, 20, 30, 10, 20, 30)
Ungraded Questions
Get ready for an exhilarating evaluation of your understanding! Brace yourself as we dive into the upcoming assessment. Your active participation is key, so make sure to attend and demonstrate your knowledge. Let’s embark on this exciting learning journey together!