If your goal is simply to insert a comma every 12 digits, you can use this:
def insert_every_n_chars(string: str, char: str, n: int) -> str:
'''
This function will take a string and insert a given character after every N characters.
'''
return char.join(string[i:i+n] for i in range(0, len(string), n))
Just copy and paste? My coding skills are limited to html I’m afraid. Thank you very much for your help. Do you know I can parse, say a number that is a million digits long?
Dent Thanks! Where in the code do I input my unstructured data? Do I tell this code to run against a file that contains my data? In text format? I apologize for my newbie questions, but I’ve been doing this by hand and I’m going cross-eyed