Avatar ·

How to divide the whole number into separate numbers, and bring them through a comma?

📁 список, строка, python, пример

For example, there is a line a = 987

how to conclude in this format:?

   9 ,  8 ,  7      

it is possible like through a cycle for () and then write it to the list and display it through Split with a comma, but it will be a lot of code, as can be realized as well?