Reverse the string (String)
Write a function that receives a string (String) as input and reversed it
Example
Write a function that receives a string (String) as input and reversed it
Example
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
user=input("Enter ant word you want: ) print(user.reversed())
It's a brief and good code just a little double -dot in the Inport.
Thank you for saying
def reverse(str): reverse_str = str[::-1] return reverse_str string = input("enter your text: ") print(reverse(string))
def reverse(text): return reversed(text) char = (input('number : ')) print(*reverse(char))
class Words: def __init__(self, word): self.word = word def print_word(self): return self.word[::-1] word = input("enter your word: ") obj = Words(word) print("کلمه برعکس:", obj.print_word())
def reverse(string): return string[::-1] # Examples print(reverse('amir')) # rima print(reverse('hello')) # olleh
string = input("please enter a string: ") print(string[: : -1])
i = input("Enter: ")
print(i[slice(None,None,-1)])
Or ...i = input("Enter: ")
print(i[::-1])
Submitting answers is currently unavailable.
Write a program that prints the figure below in the output *******************************
Write a program that receives a number of input and the factoriel calculates and prints it
Design a form that receives the following information using the best elements from the user and to the register page/ by posting the Post Family Subscribe of Mobile Birthday Country
CSS code to select all the following elements at once and change their background color to yellow<div class="yellow" id="box"></div><div class="yellow"></div><div class="yellow mybox"></div>Footer call to action
Create a list and display the following on the screen. Next to each item must be automatically placed.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.