So the instruction of this challenge is:
instead of printing text , print just the character at index 6 .
So printing text would print out ‘Hello World’ because that’s what’s contained in the variable.
But in this case, the challenge is asking only for the letter on text variable that is in the 6th index position. This is the string sequence contained within the text variable:
H = 0
e = 1
l = 2
l = 3
0 = 4
empty = 5
W = 6
o = 7
r = 8
l = 9
d = 10
But again, the challenge is how to only print out the letter in the 6th index position?
The concept of brackets [ ] come into play, as brackets give access to a sequence within a variable. Think of it like a door that opens into what’s contained within the variable.
So, the variable to access is text.
And to access the string sequence within that variable, you place a bracket [ ] next to text.
Then place the number of the index position asked for within the bracket.