I am very much a numbie to python.
DISPLAY should read: surname, Firstname, Day1 ,Day2,Both Days,NoDays
I have 2 txt files. employee.txt has the above information. confpack has 2 lines : 1. going 2. Bonus
employee.txt is like this: *(this is written in each line having surname,firstname,Y, Y Surname,firtname, , Y
- the Y =going blank space=not going
employees: doe,john,Y, , Smith,Mary, , Y, Candy,Jim,Y,Y,
confpack is like this: (2 lines)
am going BONUS going
So I have the following code..but having trouble putting it all together I need to bring the 2 files together to display the information. as mentioned above.
index = 0
prev = 0
str = Y[0]
substr = "Y"
while index < len(str):
index = str.find(substr,index)
if index == -1:
break
prev = index + len(substr)
index += len(substr)
len((str))
with open("confPack.txt", "r") as input_file2:
for line2 in input_file2:
print(" this is where: ", line2)