English

Consider the following tuples, tuple1 and tuple2: tuple1 = (23,1,45,67,45,9,55,45) tuple2 = (100,200) Find the output of the following statement: print(tuple1 + tuple2) - Computer Science (Python)

Advertisements
Advertisements

Question

Consider the following tuples, tuple1 and tuple2:

tuple1 = (23,1,45,67,45,9,55,45)
tuple2 = (100,200)

Find the output of the following statement:

print(tuple1 + tuple2)
Short Note

Solution

The '+' operator concatenates the two tuples.

OUTPUT:

(23, 1, 45, 67, 45, 9, 55, 45, 100, 200)

shaalaa.com
Tuple Operations
  Is there an error in this question or solution?
Chapter 10: Tuples and Dictionaries - Exercise [Page 223]

APPEARS IN

NCERT Computer Science [English] Class 11
Chapter 10 Tuples and Dictionaries
Exercise | Q 1. iii. | Page 223
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×