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 receives a number of input and from that number to zero countdown and prints in the output
Write a program that receives any professors including name, age and city from the entrance.
Write a function that receives a word and changes each letter to its next letter in the alphabet. Then returned the result. Indeed: "A" turns into "B" "" B "becomes" C "" C "becomes" D "and ........
Write a program that receives a student's lessons and the number of each unit (receiving the score and the number of units until the number is 0).
Write a function to get a string and return the length of the string Tip: In this exercise you should not use ready -made functions like Len in Python
Write a program where the user can enter the number of one -digit number and then all the numbers that can print the construction with the entered digits for example: Input: 1 input: 2 input: End 12 21 11 22
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام 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.