Print each item in the list ["The Walking Dead", "Entourage", "The Sopranos", "The Vampire Diaries"] and its index. Make sure to print its index first. Then, print the movie name.
I am taking a python course in Udemy and this one of the tasks. I keep getting an incorrect output. I believe its because they want the output in a list. This is the code I am inputing, but I am not sure how to get the output in a list.
x = ["The Walking Dead", "Entourage", "the sopranos", "The Vampire Diaries"]
index= 0
for i in x:
print(index, i)
index += 1