Let\'s say we have a list such as:
g = [\"123456789123456789123456\", \"1234567894678945678978998879879898798797\", \"654654656465656565656565565
Another option is to use map(...) :
map(...)
b = map(lambda x: x[:9],g)