I am new to python and a part of this course says this:
The following line of code will print the first character in each of the firstname and surname variables. Python starts counting at 0, so
"Tom"
would beT=0
,o=1
andm=2
.print("Your initials are:",firstname[0],surname[0])
The question I am taking is where you have to take three letters from the start of a variable using this method, I am stuck so far, can anyone correct me.
surname = input () #input :smith
print (surname[0][1][2])