Python_Institute
PCAP-31-03 · Question #43
Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to True? (Choose two.) string = 'SKY'[::-1] string = string[-1]
The correct answer is B. string[0] == string [-1] D. len(string) == 1. See the full explanation below for the reasoning.
Question
Assuming that the snippet below has been executed successfully, which of the following expressions evaluate to True? (Choose two.) string = 'SKY'[::-1] string = string[-1]
Options
- Astring[0] == 'Y'
- Bstring[0] == string [-1]
- Cstring is None
- Dlen(string) == 1
How the community answered
(48 responses)- A13% (6)
- B79% (38)
- C8% (4)
Community Discussion
No community discussion yet for this question.