Jak odwrócić sznur w Pythonie
# in order to make a string reversed in python
# you have to use the slicing as following
string = "racecar"
print(string[::-1])
Tejas Naik
# in order to make a string reversed in python
# you have to use the slicing as following
string = "racecar"
print(string[::-1])
'hello world'[::-1]
'dlrow olleh'
string = 'hello people of india'
words = string.split() #converts string into list
print(words[::-1])
def reverse(st):
s = st.split()
return ' '.join(s[::-1])