Dyskusje Q&A
What is wrong with
1 Głos
2 odpowiedziWhat's wrong in this??
3 głosów
5 odpowiedziis this wrong?
0 głosów
1 OdpowiedźQuick feedback on error?
0 głosów
13 odpowiedzioutputs array
0 głosów
2 odpowiedziHow i can do in python?
2 głosów
1 OdpowiedźWhy output is 4,9
2 głosów
3 odpowiedziHow to generate ?
0 głosów
1 OdpowiedźWhat am I doing wrong?
0 głosów
3 odpowiedzican 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 Głos
5 odpowiedziWhy this code runs?:
nums = [4, 5, 6]
msg = "Numbers: {} {}". format(nums[0], nums[1], nums[2])
print(msg)
Numbers:4, 5.
Byt the code:
nums = [4, 5, 6]
msg = "Numbers: {} {} {} {}". format(nums[0], nums[1], nums[2])
print(msg)
leading to error?
IndexError: tuple index our of range
1 Głos
3 odpowiedziPopularne dzisiaj
Learning Questions
2 Votes
Coroutines
4 Votes
Is there python 3?
1 Votes
Why do I lose my strike?
0 Votes
App is slow on july 3
0 Votes
Free free free trial
0 Votes
Happy 4th of July!
2 Votes