Spaces:
Running
Running
Update app.py
Browse filesAdd docstrinfg to count_letter_in_word
app.py
CHANGED
@@ -20,6 +20,11 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
20 |
|
21 |
@tool
|
22 |
def count_letter_in_word(word:str, letter:str)-> str: # Strawberry special
|
|
|
|
|
|
|
|
|
|
|
23 |
count = 0
|
24 |
for character in word:
|
25 |
if character == letter:
|
|
|
20 |
|
21 |
@tool
|
22 |
def count_letter_in_word(word:str, letter:str)-> str: # Strawberry special
|
23 |
+
"""A tool that count the number of time a given letter appears in a word
|
24 |
+
Args:
|
25 |
+
word: A string representing the word in which we search the letter.
|
26 |
+
letter: A string representing the letter to search.
|
27 |
+
"""
|
28 |
count = 0
|
29 |
for character in word:
|
30 |
if character == letter:
|