Joining python tuple and tuple miltiplication.pptx

AsimMukhtarCheema1 9 views 6 slides Aug 26, 2024
Slide 1
Slide 1 of 6
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6

About This Presentation

Explore the essentials of joining Python tuples with this concise and informative slide deck. Whether you're a beginner or an experienced developer, this presentation covers various methods and practical examples to help you master tuple operations. Perfect for enhancing your Python programming ...


Slide Content

Joining python tuples

Joining two Tuples Two or more tuples can be joined by using + operator.

Example: tuple1 = ( "a" , "b" , "c" ) tuple2 = ( 1 , 2 , 3 ) tuple3 = tuple1 + tuple2 print (tuple3)

Tuple multiplication: If you want to multiply the content of a tuple a given number of times, you can use the * operator.

Example: fruits = ("apple", "banana", "cherry") mytuple = fruits * 2 print(mytuple)