Tuples in Python

1 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>> a=[(2,4),(1,2),(3,9)]

>>> a.sort()>>> a

2 / 77

Among the tuple and list which of the creation is faster?

टपल और list में से किसका निर्माण अधिक तेज़ है?

3 / 77

Is the following Python code valid?

क्या निम्नलिखित पायथन कोड वैध है?

>> a=(1,2,3)

>>> b=a.update(4,)

4 / 77

What will be the size of the following tuple?

निम्नलिखित टपल का आकार क्या होगा?

t1=(["hello",1,2,3], ["Hi"," everyone"," How"," Are"," You"])

5 / 77

Which keyword is used to delete the entire tuple?

संपूर्ण टपल को हटाने के लिए किस कीवर्ड का उपयोग किया जाता है?

6 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>> a=(2,3,1,5)

>> a.sort()

>>> a

7 / 77

Which function is used to delete the particular element of the tuple?

ट्यूपल के विशेष तत्व को हटाने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

8 / 77

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

T1=(88,99,77,11,22,33,44)

print([:])

9 / 77

Is the following Python code valid?

क्या निम्नलिखित पायथन कोड वैध है?

>> a=2,3,4,5

>>> a

10 / 77

In python tuples, what is the syntax of the slicing operator?

पायथन ट्यूपल्स में स्लाइसिंग ऑपरेटर का सिंटैक्स क्या है?

11 / 77

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

t1=("hello","everyone","include helps","welcomes","you","all")

print(t1[2:4])

12 / 77

Tuples can’t be made keys of a dictionary.

ट्यूपल्स को शब्दकोश की कुंजी नहीं बनाया जा सकता।

13 / 77

Will the fourth index element will be included in the result? Suppose you have the following code,

क्या चौथा इंडेक्स तत्व परिणाम में शामिल किया जाएगा? मान लीजिए आपके पास निम्नलिखित कोड है,

t1=("hello","everyone","include helps","welcomes","you","all")

print(t1[2:4])

14 / 77

Will it be considered a tuple?

क्या इसे टपल माना जाएगा?

T1= "include help",

print(type(T1))

15 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>> a,b=6,7

>> a,b=b,a

>>> a,b

16 / 77

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

T1=("hello",[1,2,3,4],("Namastey","Bonjour"))

print(T1[1])

17 / 77

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

T1=("hello","include help",-1)

print(T1[-1])

18 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>> a=(1,2)

>> b=(3,4)

>> c=a+b

>>> c

19 / 77

Can you create a tuple inside a tuple?

क्या आप टपल के अंदर टपल बना सकते हैं?

20 / 77

What do you mean by negative indexing?

नकारात्मक indexing से आप क्या समझते हैं?

21 / 77

Is the following Python code valid?

क्या निम्नलिखित पायथन कोड वैध है?

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

22 / 77

To access the element of a tuple through indexing which symbol is used?

इंडेक्सिंग के माध्यम से ट्यूपल के तत्व तक पहुंचने के लिए किस प्रतीक का उपयोग किया जाता है?

23 / 77

What will be the output of the following code?

निम्नलिखित कोड का आउटपुट क्या होगा?

tuple1 = ("tuple")

print(type(tuple1))

24 / 77

Is the following Python code valid?

क्या निम्नलिखित पायथन कोड वैध है?

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

>>> a,b,c

25 / 77

Can you create a single-element tuple?

क्या आप एकल-तत्व टपल बना सकते हैं?

26 / 77

In python tuples, different elements are separated by which symbol?

पायथन ट्यूपल्स में, विभिन्न तत्वों को किस प्रतीक द्वारा अलग किया जाता है?

27 / 77

Is the following Python code valid?

क्या निम्नलिखित पायथन कोड वैध है?

>> a=(1,2,3)

>> b=('A','B','C')

>>> c=tuple(zip(a,b))

28 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = ('apple', 'banana', 'cherry')

result = sorted(my_tuple)

print(result)

29 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

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

>> b=slice(0,2)

>>> a[b]

30 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = ('apple', 'banana', 'cherry')

result = max(my_tuple)

print(result)

31 / 77

What type of data is: a=[(1,1),(2,4),(3,9)]?

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

32 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3)

result = sum(my_tuple)

print(result)

33 / 77

Which of the following methods can be used to check if an element exists in a tuple in Python?

निम्नलिखित में से किस विधि का उपयोग यह जांचने के लिए किया जा सकता है कि पायथन में टुपल में कोई तत्व मौजूद है या नहीं?

34 / 77

Is the following Python code valid?

क्या निम्नलिखित पायथन कोड वैध है?

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

>>> del a

35 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3)

result = my_tuple + (4,)

print(result)

36 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (('a', 1), ('b', 2), ('c', 3))

result = dict(my_tuple)

print(result)

37 / 77

Which of the following methods can be used to convert a tuple into a dictionary in Python?

पायथन में टपल को डिक्शनरी में बदलने के लिए निम्नलिखित में से किस विधि का उपयोग किया जा सकता है?

38 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>> a=(2,3,4)

>>> sum(a,3)

39 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, [2, 3], 4)

my_tuple[1].append(5)

print(my_tuple)

40 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3, 4, 5)

result = tuple(filter(lambda x: x % 2 == 0, my_tuple))

print(result)

41 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

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

>>> del(a[2])

42 / 77

Which of the following statements about tuples in Python is false?

पायथन में ट्यूपल्स के बारे में निम्नलिखित में से कौन सा कथन गलत है?

43 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

tuple1 = (1, 2, 3)

tuple2 = (4, 5, 6)

result = tuple(map(lambda x, y: x + y, tuple1, tuple2))

print(result)

44 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>> a=("Check")*3

>>> a

45 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = ('a', 'b', 'c', 'd', 'e')

result = my_tuple.index('c')

print(result)

46 / 77

What does the index() method do in Python tuples?

पायथन ट्यूपल्स में index() विधि क्या करती है?

47 / 77

If a=(1,2,3,4), a[1:-1] is _________

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

48 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3, 4, 5)

result = my_tuple[1:4]

print(result)

49 / 77

Which of the following methods is used to remove an element from a tuple in Python?

पायथन में टपल से किसी तत्व को हटाने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

50 / 77

What is the data type of (1)?

(1) का डेटा प्रकार क्या है?

51 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3)

result = my_tuple * 2

print(result)

52 / 77

Which of the following statements about tuples in Python is true?

पायथन में ट्यूपल्स के बारे में निम्नलिखित में से कौन सा कथन सत्य है?

53 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>>my_tuple = (1, 2, 3, 4)

>>my_tuple.append( (5, 6, 7) )

>>>print len(my_tuple)

54 / 77

What is the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या है?

my_tuple = ('a', 'b', 'c')

my_list = list(my_tuple)

my_list.append('d')

result = tuple(my_list)

print(result)

55 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3)

converted_list = list(my_tuple)

print(converted_list)

56 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>>t1 = (1, 2, 4, 3)

>>t2 = (1, 2, 3, 4)

>>>t1 < t2

57 / 77

Which of the following methods is used to convert a tuple into a list in Python?
पायथन में टपल को सूची में बदलने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

58 / 77

What will be the output of the following Python code snippet?   निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3)

print(len(my_tuple))

59 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>>t = (1, 2)

>>>2 * t

60 / 77

Which of the following methods is used to find the length of a tuple in Python?

पायथन में टपल की लंबाई ज्ञात करने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

61 / 77

What will be the output of the following Python code snippet?   निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

tuple1 = (1, 2, 3)

tuple2 = (4, 5, 6)

result = tuple1 + tuple2

print(result)

62 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

d = {"john":40, "peter":45}

d["john"]

63 / 77

Which of the following methods is used to concatenate two tuples in Python?

पायथन में दो टुपल्स को जोड़ने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

64 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>>t = (1, 2, 4, 3, 8, 9)

>>>[t[i] for i in range(0, len(t), 2)]

65 / 77

What will be the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3, 4, 5)

reversed_tuple = my_tuple[::-1]

print(reversed_tuple)

66 / 77

Which of the following methods is used to reverse the elements of a tuple in Python?
पायथन में टपल के तत्वों को उलटने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

67 / 77

What will be the output of the following Python code snippet?   निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = ('a', 'b', 'c', 'a', 'b', 'a')

print(my_tuple.count('a'))

68 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

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

69 / 77

Which of the following methods is used to count the number of occurrences of a specified element in a tuple in Python?
पायथन में टपल में किसी निर्दिष्ट तत्व की घटनाओं की संख्या की गणना करने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

70 / 77

What will be the output of the following Python code snippet?   निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = ('a', 'b', 'c', 'd', 'e')

print(my_tuple.index('c'))

71 / 77

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

>>t=(1,2,4,3)

>>>t[1:3]

72 / 77

Which of the following methods is used to find the index of a specified element in a tuple in Python?

पायथन में टुपल में किसी निर्दिष्ट तत्व का सूचकांक खोजने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?

73 / 77

What will be the output of the following Python code snippet?   निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?

my_tuple = (1, 2, 3, 4, 5)

print(my_tuple[1:4])

74 / 77

Suppose t = (1, 2, 4, 3), which of the following is incorrect?

मान लीजिए t = (1, 2, 4, 3) तो निम्न में से कौन सा गलत है?

75 / 77

Which of the following operations is not valid for tuples in Python?

निम्नलिखित में से कौन सा ऑपरेशन पायथन में टुपल्स के लिए मान्य नहीं है?

76 / 77

What is the output of the following Python code snippet?

निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या है?

my_tuple = (1, 2, 3)

print(my_tuple[1])

77 / 77

Which of the following is a Python tuple?

निम्नलिखित में से कौन पायथन टपल है?

 

Your score is

The average score is 45%

0%