Can anybody describe this code to me? | SoloLearn: Learn to code for FREE!

0

Can anybody describe this code to me?

I am a new learner at sololearn. I am not being able to understand this code. If anybody can describe this code to me i would be thankful. class SpecialString: def __init__(self, cont): self.cont = cont def __gt__(self, other): for index in range(len(other.cont)+1): result = other.cont[:index] + ">" + self.cont result += ">" + other.cont[index:] print(result) spam = SpecialString("spam") eggs = SpecialString("eggs") spam > eggs

7/2/2020 2:34:02 PM

Shafayet Arish

2 Answers

New Answer

+1

It is python

0

Please specify a relevant language in the thread tags 👍