+ 3

What is the name of the function for flipping strings in python?

The name of the function that does this: Input = "string" Output = "gnirts"

9th Nov 2020, 8:10 AM
KABIR ⚡🇳🇬
KABIR ⚡🇳🇬 - avatar
18 Respostas
+ 12
Most of the possible solutions have been mentioned here, So this part is solved. But we should accept questions like this. There is no reason to say that this is a too simple question, because this depends on the knowledge and the experience of the person who is asking for help.
9th Nov 2020, 10:05 AM
Lothar
Lothar - avatar
+ 7
Technically, a palindrome isn't a function for flipping strings, it's a string that reads the same forwards and backwards, e.g. "radar".
9th Nov 2020, 9:12 AM
David Ashton
David Ashton - avatar
+ 6
Actually you can't use the str.reverse() method on strings because they are immutable, but you can use the reversed() function like this: print("".join(reversed("abc")))
9th Nov 2020, 9:02 AM
David Ashton
David Ashton - avatar
+ 4
Whatever you decide to call it because there is none. *remember syntax: <string>[[start:]stop[:step]]
9th Nov 2020, 8:12 AM
Slick
Slick - avatar
+ 4
Kabir Isyaka don't hate on Santosh though, this question has been asked many times. He's just trying to keep q&a clean. In the future, try using the search function to look for a question that may have already been asked. (90% of questions)
9th Nov 2020, 8:23 AM
Slick
Slick - avatar
+ 3
Pallindrom plz don't ask this simple question that you can get from Google any confusion related questions ask here Kabir Isyaka ok
9th Nov 2020, 8:10 AM
Sâñtôsh
Sâñtôsh - avatar
+ 3
when in the "Discuss" tab, tap on the magnifying glass on the upper part of the screen. Then type in keywords for your question after you search, you can filter the results to show you the most popular to get the thread with the most answers/likes wich will more than likely have your answer
9th Nov 2020, 8:28 AM
Slick
Slick - avatar
+ 2
Såñtösh i thought this was a platform for question and answer discussions?
9th Nov 2020, 8:21 AM
KABIR ⚡🇳🇬
KABIR ⚡🇳🇬 - avatar
+ 2
You get a list of all available string methods by printing: dir(str)
11th Nov 2020, 7:34 AM
Seb TheS
Seb TheS - avatar
+ 1
yes, especially look at the "step" part and see what you can do
9th Nov 2020, 8:20 AM
Slick
Slick - avatar
+ 1
Slick thanks for the help.
9th Nov 2020, 8:40 AM
KABIR ⚡🇳🇬
KABIR ⚡🇳🇬 - avatar
+ 1
You can append all chars in a list and then reverse and join chars together. 😁
10th Nov 2020, 9:18 AM
Ali Rashtbari (AAA)
Ali Rashtbari (AAA) - avatar
0
Slick using list slicing right?
9th Nov 2020, 8:19 AM
KABIR ⚡🇳🇬
KABIR ⚡🇳🇬 - avatar
0
Slick thank you.
9th Nov 2020, 8:24 AM
KABIR ⚡🇳🇬
KABIR ⚡🇳🇬 - avatar
0
Slick how do i use the "search function" ?
9th Nov 2020, 8:26 AM
KABIR ⚡🇳🇬
KABIR ⚡🇳🇬 - avatar
0
Quiero aprender sobre patrones de diseño. Algunos tips que me ayuden a empezar?
11th Nov 2020, 4:00 AM
Mayari Corado
0
Ignor this comment it is to find this convo latter for myself (comments I make are recorded and I can see the convos)
11th Nov 2020, 6:47 AM
Cam UOR
Cam UOR - avatar