@organ0rt1
There are a bunch of alumni and other participants in the forum that would be happy to help with any questions, so long as it doesn’t give away too much information about ongoing challenges.
Trying to guess what your question might be, here is some advice:
Bug in the code?
Try write down exactly what you want the code to do (yes, on paper). Then write down step by step what the code needs to do to achieve that, run that through an example. Then run the same example through your code using a debugger (or a bunch of print statements if you are lazy) and see where they diverge. The moment your code does anything different than what you expected like crashing or an off by one, walk back and find exactly where it starts and what caused it. This should hopefully give you an idea of where the bug is. Fix it and then repeat for the two new bugs that each fix inevitably creates.
Trying to work out how to implement or break a cipher with code?
One of the alumni have started putting together as series of guides trying to introduce this. You can find the first part here: https://www.cipherchallenge.org/its-almost-like-christmas-is-here-already/ The series might eventually cover the cipher you are looking at currently, and if not, it will build up the knowledge of how to approach it.