raise NotImplementedError
to indicate abstract methods._
in their name, e.g. _secret
1_000_000
over 1000000
._
for unused variables: _, extension = 'foobar.txt'.split('.')
Volt = float
with open('file.txt', 'r') as f:
for car in cars:
for idx, car in enumerate(cars):
for car, driver in zip(cars, drivers):
Example
class Employee(Person): # inheritance
count = 0 # static attr. (shared by all instances)
def __init__(self, name: str): # constructor
super().__init__()
Employee.count += 1
self.name = name # local attr. (local to one instance)
print(Employee.count)