in ip1.split('.')])
ip2 = ''.join([bin(int(x)+256)[3😏 for x in ip2.split('.')])
count = 0
for i in xrange(len(ip1)):
if ip1[i] == ip2[i]:
count+=1
else:
break
mask_bits = '0' * count + '1' * (len(ip1) - count)
Please format the code you posted, by wrapping it in triple backticks. -> `
Might wanna turn off emoji replacement in settings
there emojis in it that's why it doesn't work :P
Обсуждают сегодня