If we're talking about performance, I wouldn't call f2 a good method for this. While it's fine for small numbers, list.insert is O(n) for each insert, making f2 an O(n^2) operation, while the operation can easily be done in O(n) time since it requires only one pass over the data.
Two simple ways to rewrite f2 for O(n) operation are:
1. Use len() to calculate the offset from the left of the first comma so you can work left to right and use list.append instead of list.insert.
2. Use a collections.deque instead of a list to allow O(1) inserts at the beginning of the deque.
Comment
If we're talking about performance, I wouldn't call f2 a good method for this. While it's fine for small numbers, list.insert is O(n) for each insert, making f2 an O(n^2) operation, while the operation can easily be done in O(n) time since it requires only one pass over the data.
Two simple ways to rewrite f2 for O(n) operation are:
1. Use len() to calculate the offset from the left of the first comma so you can work left to right and use list.append instead of list.insert.
2. Use a collections.deque instead of a list to allow O(1) inserts at the beginning of the deque.
There are also a bunch of good solutions to this problem in http://stackoverflow.com/questions/1823058/how-to-print-number-with-commas-as-thousands-separators-in-python-2-x inlcuding the beautifully simple "'{:,}'.format(value)". I'd be interested to know how various methods perform on small vs. large numbers.