#143·icecream

how to use formatting options on the output printed by ```ic```?

Author: jerabaul29Created Mar 1, 2023Updated Aug 31, 2026

I would like to apply some formatting outputs to what is printed by ic.

For example, I like to print large int numbers using separators (some other people may want to apply another kind of formatting, for examples, scientific notation formatting or similar, so a general solution would be welcome):

python
large_int = 123456789
print(f"large_int with separator: {large_int:,}")

prints something like:

large_int with separator: 123,456,789

now if I have an ic command, I would like to be able to do something like:

python
from icecream import ic

ic.configureOutput(prefix='', outputFunction=print)

large_int = 123456789
ic(large_int, ":,")

or (reproducing only the last line):

python
ic(large_int, format=":,")

or something like this.

Is there any simple / easy way to do so? If not, is this something that could be implementable? :)