io:format is a side-effecting function. It prints to the terminal. The atom ok is the return value.
If you want to create a list of strings, this works:
> (lists:map (lambda (a) (lists:flatten (io_lib:format "~B" (list a)))) (lists:seq 1 10)).
("1" "2" "3" "4" "5" "6" "7" "8" "9" "10")