PriceList[0]
is a float. PriceList[0][1]
is trying to access the first element of a float. Instead, do
PriceList[0] = PriceList[1] = ...code omitted... = PriceList[6] = PizzaChange
or
PriceList[0:7] = [PizzaChange]*7
More Related Contents:
- Insert element in Python list after every nth element
- Replace list object based on indexes of another list (Python)
- Finding the index of an item in a list
- Finding the index of an item in a list
- How do I get the last element of a list?
- How to remove an element from a list by index
- Access multiple elements of list knowing their index
- Python pandas insert list into a cell
- Replace values in list using Python [duplicate]
- How to find all positions of the maximum value in a list?
- Insert an element at a specific index in a list and return the updated list
- In Python, how do I index a list with another list?
- Removing a list of characters in string
- Python: return the index of the first element of a list which makes a passed function true
- Using an index to get an item
- Sort list by frequency
- Understand Python swapping: why is a, b = b, a not always equivalent to b, a = a, b?
- Replace special characters in a string in Python
- Finding the indices of matching elements in list in Python
- How to add element in Python to the end of list using list.insert?
- Implement list-like index access in Python
- Indexing a list with an unique index
- Index all *except* one item in python
- How to replace elements in a list using dictionary lookup
- Python IndexError: list index out of range
- interleaving 2 lists of unequal lengths [duplicate]
- Python: filtering lists by indices
- Python and SQLite: insert into table
- How to find the max number(s) in a list with tied numbers
- list extend() to index, inserting list elements not only to the end