top of page
Writer's picturesocialcontentclub

Python :Data Types

a) String b) Tuple c) Dictionary d) List


2.Which of the following are True?

a) tuples are immutable

b) dict keys are immutable

c) set keys are immutable

d) dict keys are immutable



3. Can I add elements into a list present inside a tuple?

a) Yes

b) No


4. What data types are eligible for becoming keys in dict?

a) Tuples

b) List

c) Float

d) Set


5. Where is indexing NOT possible?

a) List

b) Set

c) Dict

d) string


6. What will be the output of the following code:

a = 1

b = 1

print(id(a) == id(b))

a) true

b) false


7. What will be the output of the following code? (a)

a = (1,2,3)

b = (1,2,3)

print(id(a[0]) == id(b[0]))


a) true

b) false


8.How many Object will be formed in the memory after running this line of Python?

x = [(1,2,3),{1,1,1,2},"This Question is Easy Please don't skip it",3.14]

a) 6 b) 7 c) 8 d) 9 e) 10


9. Which of the Following is False?

a) Dict Keys are Unique

b) Set Keys are Immutable

c) Tuple inside a list can be ed

d) List inside a tuple can be ed


10. Type Casting/Data Type Conversion is Possible in both direction from list to

tuple and from tuple to list.

a) True

b) false

7 views0 comments

Comments


bottom of page