Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)

Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)

string = ‘python’ [::2]

string = string[-1] + string[-2]
A . string[0] == string[-1]
B . string is None
C . len (string] == 3
D . string[0] == ‘o’

Answer: D

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments