Skip to content

Instantly share code, notes, and snippets.

@emilgaripov
Created May 4, 2020 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emilgaripov/e51347bf8ce77a861ce4382f689b00d4 to your computer and use it in GitHub Desktop.
Save emilgaripov/e51347bf8ce77a861ce4382f689b00d4 to your computer and use it in GitHub Desktop.
Example TypeError
'''
Задание 4.7
Преобразовать MAC-адрес mac в двоичную строку такого вида:
'101010101010101010111011101110111100110011001100'
Ограничение: Все задания надо выполнять используя только пройденные темы.
'''
mac = 'AAAA:BBBB:CCCC'
mac_ = mac.strip().split(':')
mac_ = ''.join(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