I know the title is pretty confusing. So, what I have now is a txt file. For example:
*Product 1 Orange
*Product 2 Banana
*Product 3 Peach
*Product 4 Orange
*Product 5 Peach
So, my goal is to print two of the same products together. "Product 1 product 4 " "Product 3 product 5" I thought about having a for loop
for line in lis:
if line[0]=="*":
continue
else:
print(line)
But it prints individual character instead. Can someone please help? How do I use the for loop to scan ever line instead?