str[:-n]
str
abc def ghij
abc def ghi<
#!/usr/bin/python txt = 'abc def ghij' txt = txt[:-1] print(txt + '<')
str.rstrip()
Index