mirror of
https://github.com/james-m-jordan/openai-cookbook.git
synced 2025-05-09 19:32:38 +00:00
Fix typo in Backtranslation_of_SQL_queries.py (#709)
This commit is contained in:
parent
c2959fd60b
commit
6efa2eca0b
@ -41,11 +41,11 @@ def get_candidates(
|
|||||||
|
|
||||||
def rindex(lst: List, value: str) -> int:
|
def rindex(lst: List, value: str) -> int:
|
||||||
"""
|
"""
|
||||||
Return the index of the last occurence of a value in a list.
|
Return the index of the last occurrence of a value in a list.
|
||||||
|
|
||||||
:param lst: The list to search in.
|
:param lst: The list to search in.
|
||||||
:param value: The value to search for.
|
:param value: The value to search for.
|
||||||
:return: The index of the last occurence of the value.
|
:return: The index of the last occurrence of the value.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return len(lst) - lst[::-1].index(value) - 1
|
return len(lst) - lst[::-1].index(value) - 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user