Skip to content

I don't understand this code #42

Open
@Artinflamepurity

Description

@Artinflamepurity

class SpecialString:
def init(self, cont):
self.cont = cont

def __truediv__(self, other):
	line = "=" * len(other.cont)
	return "\n".join([self.cont, line, other.cont])

spam = SpecialString("spam")
hello = SpecialString("Hello world!")
print(spam / hello)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions