'_io.textiowrapper' object has no attribute 'index'
According to everything on the entire internet there should be nothing wrong with this. I'm trying to find a specific index for string in a list. The program is based around a Product Catalogue. The task is to add items and prices to a text file, display the items nest to their prices and then allow the user to search for a specific item to find the price. Its the last part I cannot get to work.
Here's your problem. It's in the order of the variables that you're calling and returning.
return item, price, catalogueTXT, items, prices
item, price, items, prices, catalogueTXT = addItems(items, prices)
You are returning
catalogueTXT into the variable
items. Fix the order of these variables to be the same and it will return the correct info.