How do I reverse words in Python?
For instance:
SomeArray=('Python is the best programming language')
i=''
for x in SomeArray:
#i dont know how to do it
print(i)
The result must be:
egaugnal gnimmargorp tseb eht si nohtyP
please help. And explain.
PS:
I can't use [::-1]
. I know about this. I must do this in an interview, using only loops :)