Apple Interview Question

Reverse a string in Python without using str.reverse()

Interview Answers

Anonymous

Apr 6, 2015

string[::-1]

1

Anonymous

Dec 25, 2018

x = "Reverse a string in Python without using str.reverse()" print("".join([x[j] for j in range(len(x)-1, -1, -1)])) print(x[::-1])

1