Created
May 4, 2020 11:06
-
-
Save emilgaripov/620c86540276f493ae7c902a9ea04f2c to your computer and use it in GitHub Desktop.
Print statement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Задание 4.7 | |
Преобразовать MAC-адрес mac в двоичную строку такого вида: | |
'101010101010101010111011101110111100110011001100' | |
Ограничение: Все задания надо выполнять используя только пройденные темы. | |
''' | |
mac = 'AAAA:BBBB:CCCC' | |
mac_ = mac.strip().split(':') | |
mac_ = ''.join(mac_) | |
print(mac_, type(mac_)) | |
mac_ = bin(mac_) | |
mac_ = mac_.lstrip('0b') | |
print(mac_) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment