Monday, December 2, 2019

multiplication of Tuple in python

t1=(10,20,30)
t2=t1*2
print(t2)


output:
(10, 20, 30, 10, 20, 30)

example 2:


t1=(10,20,30)
t2=t1*3
print(t2)

output:
(10, 20, 30, 10, 20, 30, 10, 20, 30)

No comments:

Post a Comment

python class topic video