Write a function that takes a string as an argument and displays the letters, one per line. Do not use for loop.
index=0
fruit=”apple”
while index
Write a function that takes a string as an argument and displays the letters backward, one per line. Do not use for loop.
index=1
fruit="apple"
while index<=len(fruit):
letter=fruit[-(index)]
print(letter)
index+=1Write a function that takes a string as an argument and displays the letters, one per line. Do not use while loop.
fruit=”apple”
for letter in fruit:
print(letter)
Use loops to output the following: Jack, Kack, Lack, Mack, Nack, Ouack, Pack, and Quack.
prefix=”JKLMNOPQ”
suffix=”ack”
for letter in prefix:
____print(letter+suffix)
s = ‘Monty Python’
what is the code to return ‘monty’?
s[0:5]