This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.
JavaScript algorithmsartificial-intelligencebugbountycryptographycyber-threat-intelligencecybersecurity-projectsethical-hackinghacking-toolsmalwarenessusnetwork-monitoringnetwork-securitynmapportscannerpythonpythonprojectsthreat-intelligencevirus-scanning
title: Python bin() built-in function - Python Cheatsheet description: Convert an integer number to a binary string prefixed with “0b”. The result is a valid Python expression. If x is not a Python int object, it has to define an index() method that returns an integer.
Python bin() built-in function From the Python 3 documentation Convert an integer number to a binary string prefixed with “0b”. The result is a valid Python expression. If x is not a Python int object, it has to define an__index__() method that returns an integer.
Examples
>>> bin(1)
# '0b1'
>>> bin(10)
# '0b1010'
>>> bin(100)
# '0b1100100'
>>> bin(1000)
# '0b1111101000'