Python - Working With Tuple
Questions No: 1/44

What is the data type of (1)?
(1) का डेटा प्रकार क्या है?

Questions No: 2/44

How can you find the number of occurrences of an element in a tuple?
आप टपल में किसी एलिमेंट की अक्युरेन्सेस के नंबर को कैसे फाइंड कर सकते हैं?

Questions No: 3/44

What will be the output of the following Python expression?

x=24//6%3, 24//4//2
print(x)

Questions No: 4/44

What will be the output of the following Python code?

>>> a=(2,3,4)  >>> sum(a,3)

Questions No: 5/44

Is the following Python code valid?

>>> a=2,3,4,5  >>> a

Questions No: 6/44

What will be the output of the following Python code?

  1. >>>t = (1, 2, 4, 3, 8, 9)
  2. >>>[t[i] for i in range(0, len(t), 2)]

Questions No: 7/44

Which one of the following is inmmutable data type?

Questions No: 8/44

If a=(1,2,3,4), a[1:-1] is _________
यदि a = (1,2,3,4), एक [1: -1] _________ है

Questions No: 9/44

What will be the output of the following?

print(sum(1,2,3))

Questions No: 10/44

Which of the following operations is NOT allowed on a tuple?
टपल पर निम्नलिखित में से किस ऑपरेशन की अनुमति नहीं है?

Questions No: 11/44

Is the following Python code valid?

>>> a,b,c=1,2,3  >>> a,b,c

Questions No: 12/44

What will be the output of the following Python code?

tuple1=(5,1,7,6,2)
tuple1.pop(2)
print(tuple1)

Questions No: 13/44

List is mutable and Tuple is immutable?
लिस्ट परिवर्तनशील है और टपल अपरिवर्तनीय है?

Questions No: 14/44

What will be the output of the following Python code?

  1. >>>t1 = (1, 2, 4, 3)
  2. >>>t2 = (1, 2, 3, 4)
  3. >>>t1 < t2

Questions No: 15/44

Which of the following is a valid way to create an empty tuple?
निम्नलिखित में से कौन सा एक एम्प्टी टपल क्रिएट करने का वैध तरीका है?

Questions No: 16/44

Is the following Python code valid?

>>> a=(1,2,3,4)  >>> del a

Questions No: 17/44

What will be the output of the following Python code?

>>> a=(0,1,2,3,4)  >>> b=slice(0,2)  >>> a[b]

Questions No: 18/44

What will be the output of the following Python code?

>>> import collections  >>> a=collections.namedtuple('a',['i','j'])  >>> obj=a(i=4,j=7)  >>> obj

Questions No: 19/44

What will be the output of the following Python code?

>>> a=(1,2)  >>> b=(3,4)  >>> c=a+b  >>> c

Questions No: 20/44

What will be the output of the following Python code?

  1. >>>my_tuple = (1, 2, 3, 4)
  2. >>>my_tuple.append( (5, 6, 7) )
  3. >>>print len(my_tuple)

Questions No: 21/44

A sequence of immutable objects is called
अपरिवर्तनीय वस्तुओं का क्रम कहलाता है

Questions No: 22/44

Which of the following methods can be used with a tuple?
निम्नलिखित में से किस मेथड का यूज़ टपल के साथ किया जा सकता है?

Questions No: 23/44

Is the following Python code valid?

>>> a,b=1,2,3

Questions No: 24/44

What is the correct way to create a tuple with a single element?
किसी सिंगल एलिमेंट से टपल क्रिएट करने का सही तरीका क्या है?

Questions No: 25/44

What type of data is: a=[(1,1),(2,4),(3,9)]?
किस प्रकार का डेटा है: a = [(1,1), (2,4), (3,9)]?

Questions No: 26/44

What is the output of the following code ?

ms = ('A','D', 'H','U','N','I','C')
print(ms[1:4])

Questions No: 27/44

Choose the correct option with respect to Python..
पायथन के संबंध में सही विकल्प चुनें।

Questions No: 28/44

Suppose t = (1, 2, 4, 3), which of the following is incorrect?
मान लीजिए t = (1, 2, 4, 3), निम्न में से कौन गलत है?

Questions No: 29/44

What will be the output of the following Python code?

a=[(2,4),(1,2),(3,9)]
a.sort()
print(a)

Questions No: 30/44

What type of data is : arr=[(1,1),(2,2),(3,3)]?
किस प्रकार का डेटा है: arr=[(1,1),(2,2),(3,3)]?

Questions No: 31/44

What is the output of the following statement ?

print ((2, 4) + (1, 5))

Questions No: 32/44

What will be the output of the following Python code?

>>> a,b=6,7  >>> a,b=b,a  >>> a,b

Questions No: 33/44

What will be the output of the following Python code?

  1. >>>t=(1,2,4,3)
  2. >>>t[1:3]

Questions No: 34/44

What will be the output of the following Python code?

  1.   d = {"john":40, "peter":45}
  2.   d["john"]

Questions No: 35/44

What will be the output of the following code?

a=((0,2,3,4)[1:-2])
print(a)

Questions No: 36/44

What will be the output of the following Python code?

>>> a=(1,2,(4,5))  >>> b=(1,2,(3,4))  >>> a<b

Questions No: 37/44

Which of the following statements given below is/are true?
नीचे दिए गए कथनों में से कौन सा/से सत्य है/हैं?

Questions No: 38/44

What will be the output of the following Python code?

  1. >>>t=(1,2,4,3)
  2. >>>t[1:-1]

Questions No: 39/44

What is the output of the following?

print(max([1, 2, 3, 4.] [4, 5, 6], [7]))

Questions No: 40/44

Which of the following Statement will create a Tuple:
निम्नलिखित में से कौन सा स्टेट्मेंट एक टपल क्रिएट करेगा:

Questions No: 41/44

What will be the output of the following Python code?

  1.   numberGames = {}
  2.   numberGames[(1,2,4)] = 8
  3.   numberGames[(4,2,1)] = 10
  4.   numberGames[(1,2)] = 12
  5.   sum = 0
  6. for k in numberGames:
  7.       sum += numberGames[k]
  8.   print len(numberGames) + sum

Questions No: 42/44

What will be the output of the following Python code?

>>> a=("Check")*3  >>> a

Questions No: 43/44

Which of the following is a Python tuple?
निम्नलिखित में से कौन एक Python tuple है?

Questions No: 44/44

What will be the output of the following Python code?

  1. >>>t = (1, 2)
  2. >>>2 * t