1
PeterD 2015-04-12 08:10:56 +08:00
x = ls[0] if ls else None
|
2
hitsmaxft 2015-04-12 08:13:13 +08:00 via iPhone
你直接拿出来不就行了
|
3
supman OP |
4
PeterD 2015-04-12 08:25:13 +08:00 1
>>> ls = [u'12']
>>> x = int(ls[0]) if ls else None >>> x 12 |