Skip to content

Commit

Permalink
Making octets output cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Jun 18, 2024
1 parent bf7f514 commit 83a3aac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions octets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ip_addr = "10.88.17.100"

print()
for octet in ip_addr.split("."):
print(octet)
print(bin(int(octet)))
print(f"Octet: {octet}")
print(f"Binary: {bin(int(octet))}")
print()

0 comments on commit 83a3aac

Please sign in to comment.