Q&A Discussies
Hello. Python
1 Stem
5 AntwoordenWhy is answer 0112 in this code?
0 Stemmen
4 AntwoordenCreating a dice game
0 Stemmen
3 AntwoordenHelp me on "return"
1 Stem
7 Antwoordencan 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
1 Stem
6 AntwoordenIf problem
2 Stemmen
3 AntwoordenFunction Maths
0 Stemmen
2 AntwoordenWhat is the output of this code?
0 Stemmen
2 Antwoordenclass and methods
0 Stemmen
5 AntwoordenPopulair vandaag
Python stressed me out
1 Votes
Course Doubt
1 Votes
Lesson Takeaways
0 Votes
Data analysis
0 Votes
Saved code
0 Votes
How do i make a lexer and parser
1 Votes