python Variable Questions & Answers

Question 1: Which of the following defines a variable in Python?

Question 2: How to get the type of the following variable?

i=10

Question 3: What is the output of the following code?

s1={1,2,3,4}
s2={4,5,6,7}
print(s1&s2)
ADVERTISEMENT

Question 4: What is the output of the following code?

>>> x=100
>>> type(x)

Question 5: What is the output of the following code?

>>> x='Hello '
>>> y='World'
>>> x+y