Let\'s say we have a list such as:
g = [\"123456789123456789123456\", \"1234567894678945678978998879879898798797\", \"654654656465656565656565565
Use a list comprehension:
[elem[:12] for elem in g]