adplus-dvertising
frame-decoration

Question

Which of the following lines of code will result in an error?

a.

s={abs}

b.

s={4, ‘abc’, (1,2)}

c.

s={2, 2.2, 3, ‘xyz’}

d.

s={comp}

Posted under Tuples and Sets Python

Answer: (d).s={comp}

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following lines of code will result in an error?