0

I have to print reverse of text without knowing the length of text in python

26th Aug 2020, 7:31 AM
Jyoti Soni
Jyoti Soni - avatar
5 Respostas
+ 4
Mention languages Please in which Programming languages u want. mention languages in relevant tag
26th Aug 2020, 7:39 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 3
Python options text = 'jtskys yskysky dky' print(text[::-1]) or print(input()[::-1])
26th Aug 2020, 8:56 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Jyoti Please mention the language you want it to implement. In JavaScript: -------------- // Taking user input let inputText = prompt("Enter a string to reverse"); //Splitting it into an array let inputArr = inputText.split(''); //Reversing the array let inputArrRevered = inputArr.reverse(); //Joining the array elements to a string let inputTextReversed = input ArrReversed.join(''); ------------- I have made a code example: https://code.sololearn.com/WTF1fgf07cXw/?ref=app
26th Aug 2020, 9:42 AM
Hanuma Ukkadapu
Hanuma Ukkadapu - avatar
+ 1
#Overprogramming! x=input(type the word: ") def reversing(word): z=list(word) z.reverse() new_word="".join(z) return(new_word) print(reversing(x))
26th Aug 2020, 10:36 AM
Shadoff
Shadoff - avatar
+ 1
You can use len (str)
26th Aug 2020, 5:36 PM
Esra
Esra - avatar