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
2 odpowiedzi
+ 1
It is python
0
Please specify a relevant language in the thread tags 👍