List indices must be integers or slices, not tuple => http://zeilervido.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6NTA6Ikxpc3QgaW5kaWNlcyBtdXN0IGJlIGludGVnZXJzIG9yIHNsaWNlcywgbm90IHR1cGxlIjt9 Like anything else in Python, it is possible to delete a list. Lists have int indicies just like the error points out. And now I know how to do it, which will probably be good later on. Reassigning a List in Python You can either reassign a single item, a slice, or an entire list. The most logical possibility I can figure is you want to use it instead of whatever the user has typed into your raw input. Your code violates that guide in many places. If you also make your data structure a dict of lists, then the whole thing becomes very simple. Think of a real-life dictionary. Finally, Python comes with a style guide which you can find in pep8. Getting TypeError: list indices must be integers or slices not str Possibly Related Threads. Enter 1 for grams 2 for pounds. Python Set This is one of the important Python Data Structures. So, as an alternative to the solutions already presented, you can also add this parameter and access the rows in the way you originally wanted. First, setting fav to a 1 tuples with a string probably isn't what you want. The original error message said there was a tuple; I knew that fav wasn't the tuple, but the combination of fav and RandomNum was. tuple indices must be integers or slices, not str · Issue #19 · nephila/djangocms - Accessing a single item from the list To get just one item from the list, you must use its index. Please read the rules and guidelines below and before posting. Either the example compiles cleanly, or causes the exact error message about which you want help. How can I fix this. So i've completely solved the problem at hand by circumventing the selection issue. It gets rid of all the other stuff. Then there is the part within the brackets, what this does is it selects this piece of content Gorilla Tape 11m Now there its not selecting just that one, it selecting all the products on the page. List indices must be integers or slices doing it in this method, you could either select the code and paste and have it look like this: print item. What you're trying to do is called a list slice. Depending on what the lists contents are, that might be a problem. So if I list indices must be integers or slices to run print item. Because once I can extract just that data then I can work on making a scraper that targets the data within each product. However thank you so much, you have no idea how many people were trying to help with this to no avail. And now I know how to do it, which will probably be good later on.