foo = "abc" foo = foo + "\b" + "xyz" print foo >> abxyz print len(foo) >> 7 if key == '\b': delete_selected_points()