Oct-24-2017, 09:11 PM
Or, if you prefer tiny functions:
bitmap = lambda items: [1 if ndx in items else 0 for ndx in range(8)]
Convert list of integers to bit-mapped byte
|
|
Messages In This Thread |
Convert list of integers to bit-mapped byte - by eccles - Oct-24-2017, 09:07 PM
RE: Convert list of integers to bit-mapped byte - by nilamo - Oct-24-2017, 09:09 PM
RE: Convert list of integers to bit-mapped byte - by nilamo - Oct-24-2017, 09:11 PM
RE: Convert list of integers to bit-mapped byte - by eccles - Oct-24-2017, 09:33 PM
RE: Convert list of integers to bit-mapped byte - by wavic - Oct-24-2017, 11:16 PM
RE: Convert list of integers to bit-mapped byte - by Larz60+ - Oct-25-2017, 01:21 AM
RE: Convert list of integers to bit-mapped byte - by wavic - Oct-25-2017, 01:57 AM
RE: Convert list of integers to bit-mapped byte - by eccles - Oct-25-2017, 04:07 AM
RE: Convert list of integers to bit-mapped byte - by wavic - Oct-25-2017, 08:02 AM
RE: Convert list of integers to bit-mapped byte - by nilamo - Oct-25-2017, 03:25 PM
RE: Convert list of integers to bit-mapped byte - by eccles - Oct-25-2017, 07:35 PM
|