In trying to prune a preceding and trailing bracket - [ and ] - I encountered something unexpected. In the python 3.7 interpreter:
>>> string = [b'0123456789']
>>> string[0][:5]
b'01234'
>>> string[0][0]
48
>>> string[0][:5] == b'01234'
True
>>> string[0][0] == b'0'
False
This feels to me like an inconsistency. I am new to Python, so, am I interpreting this correctly, is this odd?