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):
new_s = ""
new_list = []
for letter in s:
new_list.append(letter)
del new_list[0],new_list[-1]
for letters in new_list:
new_s += letters
return new_s
#your code here