Files
python-VM/learning/class-and-object-orianted-python/lesson1.py

24 lines
638 B
Python

#!~/.virtualenvs/learning/bin/python
class Customer(object):
"""example class defining a customer deposit and withdraw methods
for a bank.
Attributes:
name: A string represnting the customer's name
balance: A float tracking the current balance of the customer."""
def __init__(self, name, balance, list):
super(Customer, self).__init__()
self.name = name
self.balance = balance
self.list = list
print(self.name)
print(self.balance)
for i in range(len(self.list)):
print(self.list[i])
Customer('Homer', 200, ['100', '102', '103'])