remove last 3 characters of string python 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]