How to translate a cube using python

and, i know i didn’t address your question directly so here is another thread where one of the solutions are presented: