#!/usr/bin/env python2.7 import re print(re.sub(r".(.{10}).+$", "\\1", "1521.5423728814")