As an update to my previous reply, there seems to be an issue with
apply_rotor(input_digit, rotor, position):
Output:1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 1
Forward - Digit after rotor 0 : 1
1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 1
Forward - Digit after rotor 1 : 1
1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 1
Reverse - Digit after rotor 1 : 1
Reverse - Digit after rotor 0 : 1
Rotating rotors...
Rotor positions after rotation: [0, 0, 1]
2 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 2
Forward - Digit after rotor 0 : 2
2 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 2
Forward - Digit after rotor 1 : 2
2 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 1
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 2
Reverse - Digit after rotor 1 : 2
Reverse - Digit after rotor 0 : 2
Rotating rotors...
Rotor positions after rotation: [0, 0, 2]
3 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 3
Forward - Digit after rotor 0 : 3
3 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 3
Forward - Digit after rotor 1 : 3
3 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 2
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 3
Reverse - Digit after rotor 1 : 3
Reverse - Digit after rotor 0 : 3
Rotating rotors...
Rotor positions after rotation: [0, 0, 3]
4 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 4
Forward - Digit after rotor 0 : 4
4 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 4
Forward - Digit after rotor 1 : 4
4 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 3
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 4
Reverse - Digit after rotor 1 : 4
Reverse - Digit after rotor 0 : 4
Rotating rotors...
Rotor positions after rotation: [0, 0, 4]
5 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 5
Forward - Digit after rotor 0 : 5
5 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 5
Forward - Digit after rotor 1 : 5
5 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 4
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 5
Reverse - Digit after rotor 1 : 5
Reverse - Digit after rotor 0 : 5
Rotating rotors...
Rotor positions after rotation: [0, 0, 5]
6 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 6
Forward - Digit after rotor 0 : 6
6 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 6
Forward - Digit after rotor 1 : 6
6 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 5
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 6
Reverse - Digit after rotor 1 : 6
Reverse - Digit after rotor 0 : 6
Rotating rotors...
Rotor positions after rotation: [0, 0, 6]
7 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 7
Forward - Digit after rotor 0 : 7
7 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 7
Forward - Digit after rotor 1 : 7
7 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 6
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 7
Reverse - Digit after rotor 1 : 7
Reverse - Digit after rotor 0 : 7
Rotating rotors...
Rotor positions after rotation: [0, 0, 7]
8 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 8
Forward - Digit after rotor 0 : 8
8 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 8
Forward - Digit after rotor 1 : 8
8 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 7
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 8
Reverse - Digit after rotor 1 : 8
Reverse - Digit after rotor 0 : 8
Rotating rotors...
Rotor positions after rotation: [0, 0, 8]
9 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 9
Forward - Digit after rotor 0 : 9
9 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 9
Forward - Digit after rotor 1 : 9
9 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 8
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 9
Reverse - Digit after rotor 1 : 9
Reverse - Digit after rotor 0 : 9
Rotating rotors...
Rotor positions after rotation: [0, 0, 9]
0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 0
Forward - Digit after rotor 0 : 0
0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 0
adjusted_input 0
Forward - Digit after rotor 1 : 0
0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 9
adjusted_input 1
Forward - Digit after rotor 2 : 1
Reverse - Digit after rotor 2 : 0
Reverse - Digit after rotor 1 : 0
Reverse - Digit after rotor 0 : 0
Rotating rotors...
Rotor positions after rotation: [0, 0, 10]
Rotor positions after reset: [0, 1, 0]
Encrypted sequence: 1234567890