Q32Comprehension4 Marks11 Dec 2022
Passage
Based on the above data, answer the given subquestions. Consider the following code block.
```
def f(L):
res = []
for i in L:
if len(i) > 1:
if i[0] == i[-1]:
res.append(i)
return len(res)
def g(L, char):
res = []
for i in L:
if i[0] == char:
res.append(i)
return len(res)
def h(L, char):
res = []
for i in L:
if i[-1] == char:
res.append(i)
return len(res)
L = input().split(' ') # there is only one space between the quotes
```
Assume that the following sentence is entered by the user:
i hope not you might pull a muscle you erase need to start civic small in order to achieve something big like that when it comes to learning english trust
What is the value returned by g(L, 's')?
Press Enter to check.