python remove last 4 characters from string

Solutions on MaxInterview for python remove last 4 characters from string by the best coders in the world

showing results for - "python remove last 4 characters from string"
Katelyn
14 Jun 2018
1str =  "string"
2str = str[:-1]  # Returns "strin"
Mattia
15 Jan 2018
1str = "abc"
2str = str[:-1]
3print(str)
4
5>>> ab
Paulina
02 Aug 2016
1your_string = "hello"
2your_string = your_string[:-1] # this removes the last character from your string 
Christi
19 May 2019
1foo = foo[:-n]
queries leading to this page
how to remove last character from pythonpython remove last two characters in stringremove last string se 2braate by dashed pythonpython remove last element in stringpython cutting out last 5 characters of stringpython replace last characterhow to remove the last character of a list of stringshow to remove last 2 characters from string in pythonstring remove last char pythonremove last char from a string in pythonpython remove last element from stringstrip python to remove last character from stringremove 2 last characters pythonpython string delete last characterpython string remove las charpython remove string last characterhow to remove the last index of a string in pythonremoving last digits in python stringremove last 3 characters from string pythotrim a string in python by last charactersdelete last four characters pythonpython string remove last elementremove last 3 characters pythonremove last added string of string pythonhow to remove last character from string on list in pythonpy remove last charremove last index string pythonremove last element from a string pythonremove last sentence of string pythondropping last digit pythonpython 2b remove last character of stringpython erase last character of fielhow to strip last char in function pythonhow to delete the last letter of a string in pythonpython substring without last characterpython delete last char in stringpython remove last character from string if commapythoin remove last two signes from a list itemhow to remove the last 3 letters in a string pythonpython cut off last 5 charactersget rid of last few charcterfrom string pythonpython string ignore last characterremove last char of string in pythonremove last characters from a string pythonhow to remove the last letter of a string pythonhow not to cut the last element of a string in pythondelete last item in string pythonpython remove the last char of a stringpython delete last symbols in stringpython delete last 2 element of strstrip first and last character pythonpython remove last charpython remove last stringsubtract the last charicter in a string pytrhoncut last string pythonpython string skip last characterskip last 5 char of string pythonpython remove end characters from strremove last 6 letters from string pythonjinja2 truncate string and get last part of stringdelete last caracter of string pythopython slice last character of stringpython remove last part of stringeliminate last 2 caracters in string pythonignore characters from last string python how to remove last two indexes from string in pythonhow to remove last two characters in a python stringremove last charcter from string pythonpython remove last char in a stringremove last elemebt from string in pythonpython remove last 2 letters from stringget string without last character pythonremove the last character in string pythonpython remove last 4 character from stringpython delete last line in strcut off last number python stringos remove last characters pythonremove last letter from string pythonerase last character of string pythonpython how to remove the last character of a stringpython remove last char if spaceremove n elements from ond of string pythonignore last character in a string pythonstring trim last pythonhow to remove last element in string pythondelete last char of string pythonpython take off clast char stringpython remove change last two characters from stringhow to strip the last 4 charaters in pythoncut off last character of string pythonstrip last digits from string pythonremove last index from string pytonpython pop last character of stringpython remove last n characters from stringtruncate last char pythonremoving last element from string pythonhow to remove last char in pythonhow to remove last element from the string in pythonhow to take string 14 chars from end pytohnstring remove last character pythonremove last 3 characters of string pandaspython remove last character and return itpython take one character from end of stringremove the last occurrence of a character in a string pythonif conditions for removing last character pythonkeep last occurance in string remove others pythonpython slice string without last characterreplace last two characters string pythonpop last character of string pythonremove last character pythonpython string remove last three charactersgetting rid of the last two letters in a string pythondelete last character in string pythonhow to remove last 3 characters from a string in pythonexclude last character in string pythonremove last few characters from all strings in list pythondelete last element of a string at a location pythonremove n last element of a string pythonpython string exclude last characterpython remove last character from string by indexpython remove 4 characters frome the end of a stringremove last 4 characters of string pythonpython cut off last character in stringtake out last 5 characters of string pythonpython end 3d 22 22 last character removepython remove last appearence of characterhow to remove last 2 characters in string pythonpython get all characters except lastremove the last letter pythonpython strip last substringpython remove last one from stringstr in remove last chracher in pythonsubstring remove last character pythonpython pop last char of stringremove the last char in string pythondelete last word from string pythonget last index of char in string pythonhow to exclude the last character in python stringremoving the second to the last character of a string in pythonpython file remove last characterhow to remove last character of from a string in pytontrim last two characters pythonhow to remove the first and last character of a string in pythonhow to delete the last character of a string in pythonhow to slice the string minus the last 3 letters in pythonpython binary string remove last characterremove last digits string pythondelete last character in list pythonpop last character from string pythonhow to remove the last character of a string pythondelete last letter string pythonhow to remove last letter of a string in pythonremove the last char from str in pyremove the last matching character from pythonpython remove the last 2 characters of a stringpython trail last charcterpython string without last characterhow to remove last space from string in pythonremove last non empty character from string pythonremove last word from string pythopython string print all characters except lastpython remove second last character of stringpython delete last character from stringpython string pop lastremove the last 5 characters from a string pythonhow to remove last character in a string pythonhow to remove last letter of a string pythonhow to delete the last two element in a string pythonremove last word from stringpython remove the last char rom a strinfhow to delete the last character from a string in pythonsubstring remove last 4 characters pythonpython string trim last 3 charsremoving last character from string in pythonpython cut off last character stringpython remove last character from stringpython skip last char of a stringstring cut last character pythoinstrign remove last character pythonpython how to delete last letter from a stringremove last speicific character in pythonremove last char in pythonremove last character string pythonpython substring remove last characters until charhow to remove last character from string in pythonregex python remove last charactercut last character from string pythonstring remove last character by dpace in pythonhow to remove the last character of the strin gin pythonhow to remove the last item in a string pythonpython remove last two elements from stringpython how to remove all the characters from a list object unless the last 5remove the last char pythonhow to remove the last 2 char in a string pythonif last index character this then remove pythonhow to replace the last character in a string in pythonpython delete the last charpython string without last 4 characterspython code for removing last characterremove last part of string python after certain characterpython remove last charachter from stringdelete last letter of string pythonremove string rom python string last remove last 4 characters from string pythonstring without last character pythonpop last element from string pythonremove last letter form string pythontake the last character off of a string pythonpython how to pop last character from stringhow to drop last character from a string in pythonhow to remove last characher from a string in psthonpython remove everything after last occurrence of characterhow to remove last character from string pythonhow to check and remove last character pythonremove the last element from python stringremove last 6 cahartes from string pythonpython cut last 3 charactersremove last element of a string pythonpython select all string except last characterpython slice string last characterpython string index exclude last charactererase last character of string if 2f pythonpython get last word in stringstr remove last character pythondelete last two characters of string pythonpython remove last characters in stringget string except last character pythonremove last instance of character pythonremove last part of string pythonleave only 2 last caracters pythonremove last characters from string til 2f pythondelete last characters of string pythonpython program to strip the last 4 characters from the stringhow to remove the last character of string in pythonhow to strip last 2 character from string in pythonhow to remove the last x chars of a string in pythonpython remove last character from a stringpy remove last character from string python remove frist and last item from stringstrip last character do in pythonremove last 4 cgharacters from a string pythinremoving the last character of a string in pythonpython remove 2 last 2 characters from stringremove last two characters pythonpython delete last letter of stringpop off last character int string python 22remove last letter form string python 22 28puedes usar los corchetes 29python string remove last two characterpython reove last character from strinmgpython remove last n characters from column stringstring function to delete the last character pythonpython change last character in stringpython remove last letters from stringremove last character from string in pythonpython string change last elementhow to remove last char of a string pythonremove last string chart in pythondelete first and last char from string pythonhow to chop off last 4 characters in a string pythondelete last character python stringdelete last two characters in string pythonpython right trim last 4 characterspop last character in string pythonpython substring last n characterspython strip last character of stringremove last letter in string pythonpython remove from a char to the last of stringhow to cut last part of string in pythonhow to remove last string in pythonhow to remove the last 3 characters of a string in pythonpython remove the last character from a stringhow to remove last 3 characters of a string in pythonremove last part of a string pythonhow to remove last three letters from a string in pythonhow to remove last digit in pythondelete last 2 characters string pythonremove last 2 characters in string pythonremove last character in string pythonhow to delete last element of string in pythonremove 1st and last character from string pythonpython stringio remove last characterstrip the last 3 chars of a string pythinhow to remove the last character of a list in pythonremove the first and last character of a string pythonhow to strip off last charictor in a string in pythonpython remove string last elementremove last line of string with text in it pythonpython delete first and last char from stingremove last character of string in pythonhow to slice last 6 characters in pythonremove last character from string pytohnremove last 3 character from string pythonslicing removing last characters pythonremove last x letters str pythonpython remove last character in stringremove last character from string python pythonremove last 2 chars from string pythonstring remove last element pythonreplace last letter of string pythonremove last 2 character from string pythonhow to remove last two letters of string pythonpython remove last vowel from stringremove last string using pythondelete the last character of a string pythonhow to remove last letter from string in pythonpython remove last letter of stringpython string drop last characterremove last letters from string pythonpython remove last element from a stringremove last character from array pythonremove last 3 digits pythonpython string cut last charremove first and last character from string pythonhow to drop last character in pythondropping the last character in a string pythonpython string delete last wordpython word without last elementhow to delete last digit in pythondjango remove last stringhow to remove the last index of the string pythonpython remove last instance of character from stringsplice n characters from string end pythonremove last char in string pythonpython how to delete last letter in a stringdelete character from last item in list pythonpython remove last two chars from stringremove last letter of string pythonhow to remove last 4 characters of string pythonhow to remve 3 last letters pythonget rid of last character in object pythonpython remove last vowels from stringhot to remove the last 5cn in string in pythonpop last value of string pythonpython delete string last characterdelete last 4 chars string pythonhow remove the last 2 latter of a string in pythonpython code to remove the last character from a stringhow to get rid of last character in string pythonstring remove last two characters pythonremove last 3 letters from string pythontrim last character pythonremove last 11 characters from string pythonremove last char pythostring delete last character pythonpython string remove last characterspython string remove last n characterspop last character string pythondelete last str pythondelete last char in list pythontake off last letters of string pythonhow to remove last character from string in p 5byhtonremove last newline from string pythonhow to all chars except the last in a string pyhtonhow to remove last two characters from a string in pythonpython remove last caracterepython remove last 5 of stringpython string trim last characterpython remove the last letter of sting stackoverflowpython trim last character of stringpython how to remove last letter from stringremove the last letter of a string pythonhow to remove last item in python stringstring remove the last character pythonpython remove first character and last charcter from stringdelete last part of string pythondelete last 2 characters pythonpython remove the last charhow to fetch last character of string in pythonpython all but the last character in stringhow to remove last 4 characters from string in pythonhow to not cut the last element of a string in pythonremove last char of a string pythonhow to remove the last char in string in pythonhow to remove last 3 characters in a string pythonremove last 5cn of string pythonhow to remove last few letters from string pythonremove last characters from list elements pythonpython cut last two characterspop last element of string pythonslice the string without last four characters pythonremove last char from string in pythonpython cut off last 7 charspython get all string except last characterhow to delete last character of string pythonremove last character from a string pythonhow to remove last 2fn from a string in pythoncut off last two characters string pythondelete last 10 chars of string pythonpython string cut last n characterspython remove last byte from stringhow to remove last 3 characters in string pythonstrip remove specific last characters pythoncut off last 2 letters of a string pythonpython string extract all but last characterpython slice remove last charextract a substring excluding last characterpython to slice off last four characters of a stringpython string remove the last characterremove everything after the last occurrence pythonpython remopve last n chars of stringhow to delete the last char in string pypython remove 3 characters from stringhow to remove last 5 characters from string in pythonpython string cut off last n charactershow to take the last letter off a string pythonhow to delete last element in string pythonpython pop last letter in stringremove all text before last occurence of string in string pytohn pythonpython trim last letters from a stringdelete in the last too charactress for a string pythonpython remove last charaxcter from stringremove last two characters from a string pythonremove last sstring inpython in pythonhow to delete the last char in a string pythonpythonscript to remove last letter from stringdelete last letter in string pythonpython strip last 2 charactersremove last three characters from string pythonpython delete last characters from stringremove only last instance of character pythonremove last four characters from string column pythonremove only last instance of substring in string pythonhow to remove last char from a string pythoncut out last 4 chars from string pythonto remove last character in string pythonstrip last character pythonremove last character in last item list pythonpython remove last digit from numberremoving last 3 charcter from string pythonhow to delete the last char of a string in pythonpython remove first and last characters of a stringpython string minus last characterpython delete last two characters of stringpython remoce last stringpandas remove last n characters from stringcut last two characters pythonremove last character from string python remove 4 last character from string pythonhow to remove last element from string in pythonpython string lose last charcterpython remove the last 3 characters from a stringhow to remove last two characters of a string pythonremove last 3 char from string pythonpython remove last chars from string by charhow to delete last char of stirng pytohnpython method to remove lastremove last occurrence of substring pythonpython cut off last char in stringhow to remove the last letter of a string python 3python get rid of last character in stringpython replace ignore last character in stringhow to remove last char in string pythondrop last index of a string pytonpython delete last chars from stringhow to remove last 4 char in string pythonhow to splice a string python remove last characterpython3 remove last charremove last character from a string in djangoremove last value from string pythonin python how to remove the last charecter in stringremove last index of string pythonhow to remove the last two characters of a string in pythonpython string remove last character ifpython delete string last letterremove last item of string pythonremove last n characters string pythonremove last word from string pythonpython trim last characterpop last element in string pythonhow to remove last character from string pythodjango remove last characterpython remove the last charcter from strindhow to remove last line from a string in pythonget rid of last character in string pythonremove last element string pythonpython delete last character in string not workingdelete the last character in a string pythonchange last two characters scritng pythonpython remove n characters from end of stringhow to remove last characters from string in pythonremove last 3 characters of string pythonpyton remove last letterremove las letter from string pythonpython remove 3 characters from the end of a stringremove last char of string 5cn pythondelete last 3 characters of string pythonhow to change the last character of a string in pythonhow to delete last character from a string in pythonhow to remove the last letter of a string in pythonignore last char in python stringremove the last character from a list pythonhow to remove char from string at last in pythonpython remove last chars from stringpython string delete last charpython string splice last characterdelete last character in string python looppython print delete last characterpython remove tthe last character in a stringremove last element from string gpytohnpython remove last character of stringpython except last charadcterpython slice remove last characterpython remove last letter from stringpython string slice remove last characterpython remove lastremove last 3 characters from string pythonpython how to remove last newline character from stringhow to remove last character pythondelete last element from string pythonremove last character in a string pythonpython strip last 3 characterspython string remove character last positionpython remove last special characterhow to delete the last string character in pythonhow to trim last charecters in string pythonpython3 string exclude last letterstrip last character string pythonremove last word in pythonremove the last character from a string pythondelete last charter of string pythonpython remove last word in stringdelete last number of a string pythondelete last two characters of string python 3python strip last three characterspython cut everything but last charactersremove last 2 string pythonremove last character object valuehow to remove last char from string pythonhow to remove the last string in pythonhow to remove the last char in a string pythonexcluding last items in string pythonhow to pop the last element of a string in pythonextract characters from string python after last characterremove last x characters from string pythonpython remove last char of stringtrim last 3 items from string tyscpritremove last 6 numbers pythonremove last three characters of string pythonremove final character from string pythonremove last letter from a string pythonhow to remove last character from a string in python python cutting out last character of stringpython last letter in substring no printedremove last four characters from string pythonhow to remove last two character from string in pythonhow to remoe last letter from string in pythonpython remove last characters from stringslice off last character pythonremove last string pythonpython cut last character of stringghow to remove last cahr from str i pythonremoive two last character of string pythondelete first and last character in string pythonpython remove last 3 characters from stringremove last n elements of str pythonpython remove last char form stringpython get string except last characterremove last letter from string pythow to remove the last characters of a string in pythonhow to tka off last letter from a string pythonremove last n characters from string pythonpython remove last strinfpython delete last 3 characterspop last cher of str pythonremove last character from list pythonremove the x last char of a string pythonremove everything after last occurence of a character pythonremove the last 4 characters in pythonhow to remove last part of string in pythonpython remove the last character of listremove last character from list of string pythonpython string trim last characterspython remove last 5 characters from stringdelete last character from string pythoncut last string element pythonremover last leter from string pythonpython remove past n charactershow to remove the last character of a string in pythonreplace last 3 digits pythonpython cut last character from stringpythonremove last character from stringstring remove last characters pythonpython trim last 3 characters from list of stringsremove last character of a string pythonremove last space from string pythonhow to remove the last letter of a string pypython string remove last 3 characterspython delete last character printpython string remove last characterremove last character from string if comma pythonpython remove last caracter if special caracterhow to remove last characters from string pythonremove two last letter from string pythonremove the last 3 characters of date in pythonpython string remove lasthow to remove the last character in a string in pyhow to remove the last element of a string in pythonhow to remove last before 2c in string ptyhonremove all characters except last one pythondeleting last character in string pythonslice string python last n characterspython remove last character from string and append newpython remove last 4 characters list comprehensiontake all but last 4 characters of string in pyremove last 6 characters from string pythonhow to delete last character of string in pythonhow to remove the last three characters of a string in pythonpython str remove lastpython string 2c strip last characterpython delete last char from stingremove the last character from string pythonhow to remove last 5cn from a string in pythonstring remove last 3 characters pythonremove first and last char from string pythonremove first two and last two characters from string pythonpython remove all characters from the last accour character 22 22 in the endremove last two digit from string pythonpythong sting remove last characterpython remove last value in stringremove last char phytndelete last char pythonpy string minus last characterpython command to remove last character in a stringhow to remove the last letter of string pythonremoving last 2 element of a string pythonpython cut last word from stringremove last five letters pythonstring slice in python to exclude last characterremove the last 3 str pythonhow to slice off the last character in pythonlast n characters of string pythonremove last space string pythonhow to remove last character space in pythonhow delete x last chars of string pythonreplace last k character in string pythonpython delete last line in stringremove last char in str pythonhow to strip last 4 characters from a string in pythonpython remove last n elements from stringpython slice last 2 charactersremove 3a in python string only last in pythonpython how to remove last character from stringremove last digit from string pythonremove last few characters from string pythonget string without last values string pythonpython remove last value stringremove last two characters of a string pythonslice everything but last character from string pythonremove last character in string in python remove last character from string pythonhow to remove last parts of strings in pythonpython cut off last characterpython take off last characterpython strip the last character of a stringremove last character in string inpythonremove lat charecter of string pythonremove the last 3 characters of datetime in pythonremove last chracterafter from string pythonpython string remove last substringlast spesific character remove pythonhow to remove last two characters of a string in pythonpython 2c everything except last character in stringdelete last 3 elements of string pythonstrip last character from string pyhtontake all but last 3 characters of string in pythonpython string change last characterhow to take out last letter of a string in pythonremove last occurrence of character in string pythonremove last character from string in list pythonremove last element froma string pythonpython exclude last character of stringpython string replace last characterpython remove last character from stringtake off last character of string pythonpython remove last string caractereremove last char of string pythoncut the last sign on string pythonremove last k characters from string pythondelete last string in for loop pythonpython remove last split from stringremove last letters of string pythondelete last 5 characters in pythonremove last character from string pytho9npython remove last 3 characters from column stringremove last item in string pyth0onhow to trim the last character of a string in pythondeleted last words of a string pythonremove the last element of a string pythonreturn last character of string in python using slicepython remove last 3 chars from strremove last blank char pythonremove last and first character from string pythonpython end last character removepython3 remove last char from stringpython remove last character from array od stringsdelete last char in string pythonremove last string character pythonstring get rid of last 2 pythonpython remove last 2 character from stringremove last character of line in string pythonpython remove last character of a stringpython string remove last character if slashcut last character pythondelete lastcharacter in string pythonhow to remove last element of string pythonhow to remove the last 4 characters of a string in pythondelete last x characters pythonremove last character of string pythonremove last 3 charactters from string pythontake off last in string in pythonpython remove last 3 letters from stringremove 3b the last accoure in string pythonhow to remove the last character from a string in pythondelete last letter in python stringhow to remove last index of string in pythonremove last 2 letter from string pythonstrip last 3 characters pythonpython remove last char in indexremove last byet from pythonpython won 27t remove last character from stringpython remove last two characters printremove last char string pythonpython dtring remove last charactorremove last space from string in pythonstring cut last value pythonpython str remove last symboldrops last letters from string pythonstrip last 4 characters pythonhow to delete last character from string in pythonexclude last element in stirng pythonpython drop last character of stringcut last characters from string pythonhow to delete the last character of a string pythonhow to remove the last char in string pythonhow to remove the last 6 characters from a string pythonremove second last character from string in pythonpython3 remove last letterdelete last string pythonpython remove last digits from stringpython remove the last character of a stringpython script to remove last letter from stringpython remove last from stringpython delete last word from stringremove the last word from a string pythonhow to remove last added character from string in pythondrop last character of string pythonpython removing last character of a stringin python remove last character from stringpython string drop aslt 2 characterrevers a string python last charsleave last 3 characters of string pythonremove last element of string pythonremove just the last cha rin string pythonpython change the last character of a string without copying the entire stringhow to remove last char pythonremove last characters from string pythonpython remove last 4 characters from stringpython delete last char of stringhow to remove last n character from string in pythonremove last letter string pythonpython remove last two characters from stringhow to remove the last element of a string in pythinhow to remove last element of a string in pythonpython remove last charecter in stringremove last sentence pythonpyhton removing last letterremove last 6 characters pythonremove last character fro string pythonpython take string without last n charremove all text before last occurence of string in string pytohnhow to slice last character in pythonpython 3 substring all but last characterpython only remove last comma from a stringpython remove last word from stringhow to remove last word in pythonremove last symbol from the string pythonpython program to remove the last char from a line in pythonpython3 remove last character from stringremove last char from string pythonpython remove two last characters from stringhow to remove last 12 characters from string in pythonpython string last character removehow to delete last 2 element in string pythondrop last characters of string pythonremove last bytes pythonpython remove last symbol from stringpython delete last element of strpython skip last character in stringslice the last element of strimg pythonhow to exclude last one of the string in pythonhow to remove last 3 characters in pythondelete last 4 characters in string pythoncut last char from string pythonhow to remove the last 2 letters of a string in pythonremove last line from string pythonremove last two characters from string pythoncan i pop the last character of string pythondelete last character pythoncut off last character in string pythonslice last character pythonpython delete last character in filepython remove last charactrstrip the last character from a string pythonremove the last two characters from a string pythonremove the last character of string pythonhow to remove last index of string pythonpython remove last string characterhow to remove last dot on string in pythonpython replace last character in stringhow to delete the last character in a string pythonhow to remove the last word of a string in pythonhow to remove the last 5 letter from a string in pythondrop last char off string pythonhow to remove the last char from a string in pythonpython delete last n characters from stringtrim last char pythondelete last string in pythonhow to remove the last 3 letters of a string in pythonhow delete last characters of a text with pythonhow to remove last three characters in string in pythonremoving last element of string in pythonpython remove last 2 characters stringremove 2 last charters pythonhow to remove the last letter in a string pythonpython delete last character in stringremove last n character from string pythonpython drop last letter from stringdelete last symbil pythonreplace last chars in string pythonpython remove right charactersreplace last character in string pythonstring pop last char pythonpython delete last 4 character in stringhow to remove last 2 character from string in pythonpython remove last three characters from stringreverse string python while removing last charactersremove last element from string pythondelete last character string pythondelete last character of string pythonpython remove last 3 chardelete last leters from string pythonremove string last character pythonremove last char pythonremove last characters from stdout pythonhow to remove last letter of string pythonpython how to delete the last character of a stringremove 5 last charachest pythonremove last occurence of character pythonpython code to remove character after last match characterremove last 5 characters from string pythonremove last char from string ptonpython strip last characterremove last element of string python with popremove last 3 letters and append 3 lettersremove last element from str pythonpython chop last characterpython remove last characterpython re 3bove last characterremove last character in pythonpython string remove last 3 characterpython string all but last characterdrop last 4 chars in string pythonpython remove last character from string in listpython remove last 2 characters from stringhow to strip last character in pythonpython cut last 4 characterspython string remove last charremove last element in string pythonremove last character from string pyhow to remove last letter of string in pythonreplace end of n letters of end of string pythonpython subtract last charhow to remove the last letter for the string in pythonre word without last letterremove that last value in a string pythonremove last 2 characters from string pythondelete last character of a string pythondelete last characters from string pythonhow to eliminate last character in string pythonremove last new line from string pythonpython remove last characterspython string remove last 2 charactersremove last comma from string pythonpython string remove last 5 characterspython remove last backslah ndelete last char in pythonpython remove last line from stringstrip last character of string pythondelete last letter from string pythonpython remove last char from stringpython how to delete the last few characters of stringremove last character from listpythonchange last char of string pythonhow to remove last letter in pythonpython remove last 4 characters from string