LinkedIn Python Skill Assessment Quiz Answers

What is the output of this code?

Latest Update on 25th January, 2022 by Certification Course Answers

What is the output of this code?

num_list = [1,2,3,4,5]
num_list.remove(2)
print(num_list)
  1.  [1,2,4,5]
  2.  [1,3,4,5]
  3.  [3,4,5]
  4.  [1,2,3]

Correct Answer:

  •  [1,3,4,5]

explanation:

num_list = [1,2,3,4,5]

num_list.pop(2)
	[1,2,4,5]

num_list.remove(2)
	[1,3,4,5]

Latest Updates

No posts found in this category.