MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / __str__

Method __str__

Chapter 11 - PS/05_problem5.py:15–16  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 return result
14
15 def __str__(self):
16 return f"Vector({self.x}, {self.y}, {self.z})"
17
18# Test the implementation
19v1 = Vector(1, 2, 3)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected