Код: Выделить всё
lst=['a', 'b', 'c', 'd', 'e', 'f']
Например, я хотел бы получить:
Код: Выделить всё
next_element(lst, 'c')
# 'd' should return adjacent value of 'c'
Подробнее здесь: https://stackoverflow.com/questions/665 ... -in-python
Код: Выделить всё
lst=['a', 'b', 'c', 'd', 'e', 'f']
Код: Выделить всё
next_element(lst, 'c')
# 'd' should return adjacent value of 'c'