python string remove last 2 characters code example
Example 1: python remove last part of string
#Removing last three characters
foo = foo[:-3]
Example 2: python remove last 4 characters from string
foo = foo[:-n]
#Removing last three characters
foo = foo[:-3]
foo = foo[:-n]