Closed anthonyattard closed 5 months ago
class ReverseStringAlt(object): def reverse_string_alt(self,string): if string: return string[::-1] return string
a=ReverseStringAlt() s=input() k=a.reverse_string_alt(s) print(k)
@Harshavika is my solution correct?
@anthonyattard , this is your code which I just changed a little bit to run which gives correct answer. https://ideone.com/Tm5EE0.
The following solution does not work: