Instructions
It's pretty straightforward. Your goal is to create a function that removes the first and last characters of a string. You're given one parameter, the original string. You don't have to worry with strings with less than two characters.
Solution
def remove_char(s):
return s[1 : -1]
标签:Last,string,Character,Remove,characters,字符串 From: https://www.cnblogs.com/artwalker/p/17220459.htmla_string[start : end] : 返回一个字符串类型,返回的数据是原字符串第2个字符到倒数第2个字符之间所有字符组成的字符串