Task 1 : Python’s len(..) function takes in a string or a list, and returns its length. Using the len(..) function, for each letter in the string “Mississippi”, print “Letter i of Mississippi is: ” and the letter, where i is that letter’s index in the string. When concatenating a string and an integer, don’t forget to cast the integer as a string, as shown in Table 3.
This is the task and and i tried this code, but it gives me back only 1,2,3,4,5...
I doubt this is what they want to see.
>>> city
'Mississippi'
>>> for i in range(len(city)):
print("Letter i of Mississippi is : " + city[i], str(i))