What will be the output of below Python code? str1="Information" print(str1[2:8])
format
formatio
orma
ormat
Answers
Answered by
12
Answer:
1.format
i hope it will be correct information
Answered by
1
format
Slicing:
The concept of slicing is used in this question. In the string slicing, the output is a small series that starts at the first given location point 2 to one below the location of the second given indicator (8-1 = 7) of the given string str1.
In this 11 letter word, we will follow the same rule and remove the letter from 2 to 7. Hence, the output will be "format".
Similar questions