I'm writing a script of some useful functions to edit doubly linked lists, and I'm not using OOP. So no classes are used.

Here is a sample of a doubly linked list:

```
dll = ['So true', ['^very much', ['try it', ['Not yet', None, [...]], [...]], [...]], None]

```

Note that the structure of the ddl elements is like: [string, pointer to previous node, pointer to next node]

I'm trying to create a variable that has the value of the character `'^'` in the doubly linked list as the "cursor" (just a virtual cursor, but it's really just an index of `'^'` character), without using classes (a function, or couple functions maybe?).
Now the "cursor" variable is a pointer to the node (containing the current string) and the position within that string.

The reason I want to create it is to use it for creating useful functions like: moving cursor one character to the left, moving the cursor to the beginning of the line,...etc.

cursor = index of '^' in doubly linked list with strings.

So my question is: how to find the index of a character in a string in doubly linked list without using classes?