Python Hapus karakter terakhir dari string
str = "string"
str = str[:-1] # Returns "strin"
Batman
str = "string"
str = str[:-1] # Returns "strin"
str = "string_example"
str = str[:-1] # -> returns "string_exampl" (-> without the "e")
#Removing last three characters
foo = foo[:-3]