What is the output of print('abc'[::2]) in Python?
print('abc'[::2])
Correct answer
B. ac
5 views
B. ac
5 views
Characters of a string slice with a step.
Asked in: Python Interview Strings
https://docs.python.org/3/library/stdtypes.html#string-methodsNot sure why the answer is B? Ask here and get an explanation.