names = [‘John Snow’,‘Ned Stark’,‘Bran Stark’,‘Jamie Lannister’,‘Sam Tarly’]
print(names[len(names)-1])
For these lines of code, why was the output “Sam Tarly”? Isn’t “len” looking for length? I thought the output would be the length of “Sam Tarly”
Type your question above this line.
Course: https://www.educative.io/collection/10370001/4733468011397120
Lesson: https://www.educative.io/collection/page/10370001/4733468011397120/5636263199637504