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

Method __init__

Chapter 10 - PS/05_problem5.py:5–6  ·  view source on GitHub ↗
(self, trainNo)

Source from the content-addressed store, hash-verified

3class Train:
4
5 def __init__(self, trainNo):
6 self.trainNo = trainNo
7
8 def book(self, fro, to):
9 print(f"Ticket is booked in train no: {self.trainNo} from {fro} to {to}")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected