stock = [10, 0, 5, 0] price = [] for i in range(len(stock)): if stock[i] == 0: price.append(i) print(price)
To embed this project on your website, copy the following code and paste it into your website's HTML: