this is my first attempt on python and i would really love some help heres my code
class Customers(object):
def __init__(self, Surname = None, FirstName = None, Address = None, Town = None, Postcode = None, PhoneNumber = None, Date = None, Email = None):
self.Surname = Surname
self.FirstName = FirstName
self.Address = Address
self.Town = Town
self.Postcode = Postcode
self.PhoneNumber = PhoneNumber
self.Date = Date
self.Email = Email
def printinfo(self):
print("Surname:", self.Surname)
print("FirstName:", self.FirstName)
print("Address:", self.Address)
print("Town:", self.Town)
print("Postcode:", self.Postcode)
print("Phone Number:", self.PhoneNumber)
print("Date:", self.Date)
print("Email:", self.Email)
c = Customers("bob", "Samantha", "2 heather road", "Basingstoke", "RG21 3SD", "01256 135434", "23/04/1973", "sam.jackson@hotmail.com")
c.printinfo()
print ("who are you looking for?")
myFile = open("Address Book for A453_QP2.csv")
addressbook = []
for eachList in myFile:
nospaces = eachList.strip()
addressInfo = eachList.split(",")
print(addressInfo[0], addressInfo[1], addressInfo[2], addressInfo[3], addressInfo[4], addressInfo[5])
c = Customers([addressInfo[0], addressInfo[1], addressInfo[2], addressInfo[3], addressInfo[4], addressInfo[5]])
addressbook.append(c)