From fd2a1859d76eb0f3c9f3fe04c4799b32f5e58a24 Mon Sep 17 00:00:00 2001 From: bayangan1991 Date: Fri, 24 Jan 2020 14:46:00 +1100 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e7e5541..2e9b935 100644 --- a/README.md +++ b/README.md @@ -3742,15 +3742,15 @@ Detailed answer can be found here: http://codingshell.com/python-all-string-perm
How to reverse a string? (e.g. pizza -> azzip)
-Shortest way is: +The correct way is: ``` my_string[::-1] ``` -But it doesn't mean it's the most efficient one.
+A more visual way is:
+Careful: this is very slow -The Classic way is: ``` def reverse_string(string): temp = ""