I've started to learn to code with Python and I've just come across Loop Lists. They've given two ways to loop and I wondered when and how example A would be better than just using example B (which is more simple imo). When I print to the console they both seem to give me the same result too.
Example A:
myList = ["Apple", "Banana", "Cherry"]
x = 0
while x < len(myList):
print(myList[x])
x +=1
Example B:
myList = ["Apple", "Banana", "Cherry"]
for x in myList:
print(x)