It wants me to assign the variable fith_letter to equal to the 5th letter of MONTY


@andrewvin02: The fifth letter of your string is currently at position [4] because in programming we go from zero to string's length - 1 while in the real world we go from 1 to string's length.


@g4be so whats the letter in the string "MONTY"


here is the piece of code in the consule


@antonnifo: In this exercise you're not supposed to assign the value "Y" to fifth letter like that, instead you were supposed to do the following:

fifth_letter = "MONTY"[4]

You have a string so to access a given position, suppose we don't know what's inside of it, do like the example above.


It worked, but I don't understand why.


@judiak: What you don't understand ?


I get why we type "Monty," but why [4]?


@judiak: Different, abit, from the real world, with strings and lists we start from position zero and go until string's length - 1 so to access the fifth letter on our string, which has actually five letters, we use [4] because four is the last index in our string.

 0 1 2 3 4
Real life
 1 2 3 4 5


Oh! Alright. I get it.