Комментарии:
word = "hello world"
word = word.split(" ")
word = word[::-1]
print(word)
word = "hello world"
word = word.split(" ")
word = word[-1::-1]
print(word)
How to skip last two words in sentence?
My input string is: Hi there. My name is Kalp. This is my lucky day. I like coding so much. This is it.
Expected output is: Hi there. name My is Kalp. my is This lucky day. coding like I so much. This is it.
Thankssss
ОтветитьStr= input()
L=[]
For i in Str.split():
L.append(str[i][::-1])
Print("".join(L))
Str= input()
A = str.split()
Print ( reversed(A))
What does [-1 : : -1] means please explain...
ОтветитьVery helpful!
ОтветитьSir can we use print formatting ?
Ответитьthanku i just got out from an interview yesterday over the same question
Ответитьsdet should be printed as ted ..?
Ответитьplease explain without in built functions
ОтветитьExplain without using inbuilt functions
Ответитьwhy you didn't use words.reverse() ?
Ответитьthank you so much how to do in recursive function
ОтветитьHello! Thank you so much for your help! I've been searching for this explanation
ОтветитьNice.
ОтветитьTq bro
Ответить