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

Method __str__

Chapter 11 - PS/06_problem6.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"{self.x}i + {self.y}j + {self.z}k"
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