Il giorno gio 17 feb 2022 alle ore 17:32 Alessandro T.
<taglia...@yahoo.it> ha scritto:
>
> reg = [21070, 12601, 12340, 12593, 12593, 13312]
>
> versione compatta:
> s = ''.join(c for r in reg for i in (1,0) if (c:=chr(r >> 8*i &
> 0xff)).isalnum())

oppure anche

```
>>> "".join(chr(n) for d in reg for n in divmod(d, 256) if n != 0)
'RN190411114'
```

㎝

--
!!!! THE 🍺-WARE LICENSE (Revision ㊷):
    <㎝🐌🐍.🇮🇹> wrote this 📧. As long as you retain this notice you can
    do whatever you want with this stuff. If we meet some day, and you
    think this stuff is worth it, you can buy me a 🍺 in return. — ㎝
_______________________________________________
Python mailing list
Python@lists.python.it
https://lists.python.it/mailman/listinfo/python

Rispondere a