PCEP 30 02 PCEP Certified Entry Level Python Programmer · Free Practice Question Easy

Question 1

Assuming that following assignment has been successfully executed ?

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


Which of the following expressions evaluate to False ?

  • A

    List1.index(List1[-1]) == 0

  • B

    3 in List1[2:7])

  • C

    len(List1[0:1]) == 0

  • D

    List1.index(List1[-1]) == 4

Reveal correct answers

Correct answers: A, C

Explanation

Following expressions evaluate to False

len(List1[0:1]) == 0

List1.index(List1[-1]) == 0

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need