Код: Выделить всё
string = " *really long thing, i deleted it* "
# example string = "v>"
location = [0,0]
been_to = [[0,0]]
string = list(string)
for i in string:
if i == "v":
#down
location[1] -= 1
elif i == "^":
#up
location[1] += 1
elif i == ">":
#right
location[0] -= 1
elif i == "
Подробнее здесь: [url]https://stackoverflow.com/questions/78996475/if-statement-to-check-if-an-array-is-not-in-another-array[/url]