LinkedIn Python Skill Assessment Quiz Answers

What is the correct syntax for replacing the string apple in the list with the string orange?

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

What is the correct syntax for replacing the string apple in the list with the string orange?

my_list = ['kiwi', 'apple', 'banana']
  1.  orange = my_list[1]
  2.  my_list[1] = ‘orange’
  3.  my_list[‘orange’] = 1
  4.  my_list[1] == orange

Correct Answer:

  •  my_list[1] = ‘orange’

Latest Updates

No posts found in this category.