Courses
Log inStart Learning AI
Courses
Log inStart Learning AI

Q&A Discussions

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 Vote
6 Answers
5th Jul 2016, 6:57 AM
yogaocean
yogaocean - avatar
< Previous12Next >
Hot today
What kind of questions do companies ask in Data Analyst interviews (including Python, SQL, Power BI, and Excel)?
2 Votes
??
1 Votes
Give some simple practice questions in C
0 Votes
ĐžŃˆĐžĐ±Đșа ĐČ ĐżŃ€ĐžĐ»ĐŸĐ¶Đ”ĐœĐžĐž Sololearn
1 Votes
NEO V2.0
1 Votes
Hello guys,
1 Votes
Did sololearn helped you to get easier a job?
1 Votes
How many time I can use sololearn trial mode?
1 Votes
Help me
1 Votes
how do they use javascript
0 Votes