Fix python list widget.

Closes #1118.

Manually tested:
[x] removing trailing "]" only
[x] removing "[" and "]"
[x] adding to array post removal with widget enabled

Test battery also been run just for good measure.