Thanks for the reply but I want the output to print the items one after the other and itemize it like:
Item 1 is Razor
Item 2 is Toothbrush
Item 3 is Comb
And so on and so forth…
for index, item in enumerate(items, start=1):
print(f'Item {index} is {item.title()}.')
@Quercus The first approach (iterating range(len(items))) is a bad style in Python. It is better to iterate list directly instead of accessing individual items through the indexing operator []. The code is then more generic and can accept any iterable type not just number-indexable types.
Please pay attention to not re-assing / shadow builtins. The builtin list is being used very often. For example this expression generates list of numbers 0 - 9: