Pergunta de entrevista da empresa Apple

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

Respostas da entrevista

Sigiloso

6 de abr. de 2015

string[::-1]

1

Sigiloso

25 de dez. de 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