Computer Science, asked by seenasureshkmd, 8 months ago

write a program to reverse a string using string slicing​

Answers

Answered by ritikstar5
1

Answer:

We have a string, "Hello World", which we want to reverse:

1. The String to Reverse. txt = "Hello World" [::-1] print(txt) ...

2. Slice the String. txt = "Hello World" [::-1] ...

3. Slice the String. def my_function(x): ...

4. Return the String. def my_function(x): ...

5. Call the Function. def my_function(x): ...

6. Print the Result. def my_function(x):

Answered by Anonymous
0

Answer:

hi....

Explanation:

s=str(input("enter the string"))

reverse=s(::-1)

print(reverse,'is the reverse form of the string')

hope it helps you

please mark brainliest

Similar questions