# python 3.10.7 ---> ex.1
a = [48, 99]
for n in a: print(bin(n).split('b')[1])
# python 3.10.7 ---> ex.2
a = [111011, 10110001]
for n in a: print(int(str(n), 2))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
# python 3.10.7 ---> ex.1
a = [48, 99]
for n in a: print(bin(n).split('b')[1])
# out: 110000 \n 1100011
# python 3.10.7 ---> ex.2
a = [111011, 10110001]
for n in a: print(int(str(n), 2))
# out: 59 \n 177