CodingBat: without_end
You were right on track with

no_start = str[1:]
no_end = no_start[:len(no_start) - 1]


In a first step, they can be combined:

return str_[1:len(str_)-1]


Note: I changed str to str_ because str is actually a datatype in Python.

The next thing to know about slicing, is that you can use negative indices to index from the back without specifically using the length of the string like so:

return str_[1:-1]


And since this also works for strings with a length equal to two, you can also get rid of the earlier check.

So your are now down to basically:

def without_start_end(input_):
    return input_[1:-1]


Again take note: input_ also has the trailing _, since, you guessed it, input is already taken.



A non-directly code relate side-note: the official Style Guide for Python Code (aka PEP8) recommends to use 4 spaces per indentation level, and most people seem to follow that recommendation. There are however exceptions, e.g. Google's TensorFlow framework uses 2 spaces per indentation level (see their style guide), although Google's own "general purpose" style guide for Python code sticks with 4 spaces.