Which of the following statements is FALSE about traversing a string using loops in Python?
a. We can use a for loop with the in operator to iterate over each character in a string.
b. We can use a while loop with the len() function and indexing to access each character in a string.
c. We can use slicing with a negative step to iterate over the characters in a string in reverse order.
d. We can use the range() function with the len() function to generate the indices of the characters in a string.
Answer:
Answer by student
c. We can use slicing with a negative step to iterate over the characters in a string in reverse order.
Detailed answer by teachoo
The rest of the post is locked. Join Teachoo Black to see the full post.