Apr-04-2019, 01:47 PM
I want all comboboxes to have a blank line as the first item I have tried several ways to get spamreader to recognize a blank line (" ") with no success. I have reverted to using a list to allow me to insert a blank line example code below.
# METHOD #2 with open('Menus_Vend/MAIN.csv', newline='') as csvfile: spamreader = csv.reader(csvfile , delimiter=',') Tup1 = () for row in spamreader: Tup1 = [tuple(row)for row in spamreader] List1 = list(Tup1) #Create list from tuple List1.insert(0,'') #Insert blank at index 0 Tup1= tuple(List1) #Convert new list back to tuple csvfile.closed