Код: Выделить всё
def findElement(values: tuple, toFind):
"""Search for a value in the tuple and returns it index value."""
for value in values:
if value == toFind:
return values.index(value)
return "Requested value not found in the tuple.."
Я пробовал следующее
Код: Выделить всё
def findElement(values: tuple, toFind) int or str:
"""Search for a value in the tuple and returns it index value."""
for value in values:
if value == toFind:
return values.index(value)
return "Requested value not found in the tuple.."
Подробнее здесь: https://stackoverflow.com/questions/729 ... ent-values