Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = 123415632
- x1 = int("000000ff", 16)
- x2 = int("0000ff00", 16)
- x3 = int("00ff0000", 16)
- x4 = int("ff000000", 16)
- y1 = (a & x1)
- y2 = (a & x2) >> 8
- y3 = (a & x3) >> 16
- y4 = (a & x4) >> 24
- print(str(y1)+"."+str(y2)+"."+str(y3)+"."+str(y4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement