What will be output of below text. info1 = 'Infinity' info1.find('a')
Answers
Answered by
2
Given:
info1 = 'Infinity'
info1.find('a')
To find:
The output.
Solution:
The find(character) returns the position of the character in the text.
Here,
The given text is Infinity and the character to be found is 'a'
There is no 'a' in this text.
If the character that is being searched for is not found, the function returns -1.
Hence, the program outputs -1.
That is, the character is not found.
Answered by
0
The find (character) returns the position of the character in the text.
Here, The text given is Infinity and the character which has to be found is 'a' since There is no 'a' in this text.
If the character is not found, the function returns -1.
Hence, the output of the program is -1.
Similar questions
Math,
7 months ago
English,
7 months ago
India Languages,
7 months ago
Computer Science,
1 year ago
Business Studies,
1 year ago
English,
1 year ago
Biology,
1 year ago