1.  Yes, c will be ((1, ‘A’), (2, ‘B’), (3, ‘C’))

2.  Yes, c will be ((1,2,3),(‘A’,’B’,’C’))

3.  No because tuples are immutable

4.  No because the syntax for zip function isn’t valid

4
Correct Answer :

Yes, c will be ((1, ‘A’), (2, ‘B’), (3, ‘C’))


Explanation :
No Explanation available for this question

1.  Yes, [1,2,3] is printed

2.  No, invalid syntax

3.  Yes, (1,2,3) is printed

4.  1 is printed

4
Correct Answer :

Yes, (1,2,3) is printed


Explanation :
No Explanation available for this question

1.  Error, tuples are immutable

2.  (('check',),)((('check',),),)

3.  ((‘check’,)’check’,)

4.  (('check',)’check’,)((('check',)’check’,)’check’,)

4
Correct Answer :

(('check',),)
((('check',),),)


Explanation :
No Explanation available for this question

1.  Yes, this is an example of tuple unpacking. a=1 and b=2

2.  Yes, this is an example of tuple unpacking. a=(1,2) and b=3

3.  No, too many values to unpack

4.  Yes, this is an example of tuple unpacking. a=1 and b=(2,3)

4
Correct Answer :

No, too many values to unpack


Explanation :
No Explanation available for this question

1.  (4,6)

2.  (1,2,3,4)

3.  Error as tuples are immutable

4.  None

4
Correct Answer :

(1,2,3,4)


Explanation :
No Explanation available for this question

1.  (6,7)

2.  Invalid syntax

3.  (7,6)

4.  Nothing is printed

4
Correct Answer :

(7,6)


Explanation :
No Explanation available for this question

1.  a(i=4, j=7)

2.  obj(i=4, j=7)

3.  (4,7)

4.  An exception is thrown

4
Correct Answer :

a(i=4, j=7)


Explanation :
No Explanation available for this question

1.  True

2.  False

2
Correct Answer :

False


Explanation :
No Explanation available for this question

1.  Yes, 2 is printed

2.  Yes, [2,3,4,5] is printed

3.  No, too many values to unpack

4.  Yes, (2,3,4,5) is printed

4
Correct Answer :

Yes, (2,3,4,5) is printed


Explanation :
No Explanation available for this question

1.  (1,2,3,5)

2.  (2,3,1,5)

3.  None

4.  Error, tuple has no attribute sort

4
Correct Answer :

Error, tuple has no attribute sort


Explanation :
No Explanation available for this question

Interview Questions

MongoDB
Java Script
Node JS
PHP
JQuery
Python