+ 1

How to delete the last letter in a string on python 3

I have that question, y don't have any idea please help

14th Aug 2017, 6:04 PM
Juan Diego Marin Rodriguez
Juan Diego Marin Rodriguez - avatar
3 odpowiedzi
+ 2
The easiest way is probably by doing this: myString = "Hello" myString = myString[:-1]
14th Aug 2017, 6:26 PM
S C
0
do this @ juan diago string=input(' ') del string[-1] print(string)
14th Aug 2017, 6:29 PM
sayan chandra
sayan chandra - avatar
0
thanks, you save me
14th Aug 2017, 6:39 PM
Juan Diego Marin Rodriguez
Juan Diego Marin Rodriguez - avatar