I am executing the below code:
s = 'python'
a, b, *c, d = s[0], s[1], s[2:-1], s[-1]
print(c)
I am getting output as ['tho']
Please help me understand why the output is not ['t', 'h', 'o'] ?
As we are using the * operator on LHS, so the output should be ['t', 'h', 'o'] and not ['tho']