In Python 2 or 3:
>>> a, = [1]
>>> a
1
>>> a, = []
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: need more than 0 values to unpack
>>> a, = [1,2,3]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: too many values to unpack (expected 1)
In Python 3, you can also
>>> a,*_ = [1,2,3]
>>> a
1