From 3de85c566ca2279ec0388027d19d825380b1d120 Mon Sep 17 00:00:00 2001 From: Worood esam <91219550+Wroo11d@users.noreply.github.com> Date: Sun, 26 Sep 2021 20:20:35 +0300 Subject: [PATCH] Update python_pass.py --- python_pass.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/python_pass.py b/python_pass.py index 9616d7a..f2fe3b9 100644 --- a/python_pass.py +++ b/python_pass.py @@ -10,5 +10,18 @@ class StringOperations: - def reverse(self, *, to_be_reversed: str = None): - raise NotImplemented('This method need to be implemented') + def reverse(self , * , to_be_reversed: str = None): + raise NotImplemented("This method need to be implemented") + + +class ReversedString(StringOperations): + + def reverse(self , to_be_reversed: str =None): + word = ' ' + for i in to_be_reversed: + word = i+word + return word + +string = ReversedString() +word='Programming' +print(string.reverse(word))