Domanda di colloquio di Goldman Sachs

How would you reverse a string

Risposta di colloquio

Anonimo

27 mar 2019

String reversed_string=None for i in range(len(reverse_this), -1): Reversed_string+= reverse_this[i] I tried to use string splicing but they wanted a for loop lol. String[::-2]

1