>>> import marshal >>> marshal.loads('l\x02\x00\x00\x00\x00\x00\x00\x00') 00000L >>> bool(_) True >>>