• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu

Dyskusje Q&A

can someone help.. what does this code means so it could have the output like on the example.. 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
magic-methodspython
1 Głos
6 odpowiedzi
5th Jul 2016, 6:57 AM
yogaocean
yogaocean - avatar
< Do tyłu12Dalej >
Popularne dzisiaj
overloading operators << >>
1 Votes
how does this code function?
2 Votes
.
1 Votes
Default constructor and default assignment operator
0 Votes
.
0 Votes
My question is about python?
0 Votes
Issue in code
0 Votes
i need to learn Coding
0 Votes
Quiz duel
0 Votes
Who is the best one in html can find for more comprehension
1 Votes