From 09c321cbcf21debd6153ee8377023b2ed0f1f6df Mon Sep 17 00:00:00 2001 From: Yashasvi Date: Mon, 31 Oct 2022 18:14:49 +0530 Subject: [PATCH] string reverse --- python/Reverse of a string using slicing | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/python/Reverse of a string using slicing b/python/Reverse of a string using slicing index d8da0434..48465f7e 100644 --- a/python/Reverse of a string using slicing +++ b/python/Reverse of a string using slicing @@ -1,7 +1,3 @@ -def reverse_slicing(s): - return s[::-1] - -input_str = 'ABç∂EF' - -if __name__ == "__main__": - print('Reverse String using slicing =', reverse_slicing(input_str)) +s=str(input("enter string")) +print("reverse of the string") +print(s[::-1]) \ No newline at end of file