SytAx Err At Line Two. How. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

SytAx Err At Line Two. How.

class O: def__init__(self, name, color): self.name= name self. color=color def b(self): print(8) o=O("i", "c") print(o.name)

21st Feb 2021, 5:34 AM
We Doru
We Doru - avatar
1 Answer
+ 9
Because there is no space between def and __init__ method
21st Feb 2021, 5:39 AM
Simba
Simba - avatar