+ 1
Why the function doesn't work ?
I want to have a code to reverse each input string but my code doesn't work ... By defining a function OR simple code of "input" how may I call my code to reverse any entered string ? This code doesn't work : https://code.sololearn.com/c4l4OZpGePDO/#py
2 Respostas
+ 5
Function works, you just forgot to print:
print(function ("hello world"))
Instead of
function ("hello world")
+ 2
def function (my_list):
my_list_reverse = my_list [::-1]
return my_list_reverse
print(function ("hello world"))