2026fa_cse160/lecture20261117/while/while04.py
2026-11-17 12:30:27 -05:00

14 lines
378 B
Python

print("Process list")
names = [ "Harry", "Larry", "Moe", "Katrina", "Colorado", "Shenanigans", "Tracey"]
counter = len(names) ;
index = 0
print("\nThe length of the list is {}\n".format(counter))
while(counter > 0 ):
print("Counter = ",counter, " Index = ", index)
print("names[{}] = {}\n".format(index,names[index]))
index = index + 1
counter = counter - 1