for login segment name street bnum apart in cursor fetchall if not bin

1
2
3
4
for login,segment,name,street,bnum,apart in cursor.fetchall():
if not bin2ip(segment).startswith('192.168.33.') or not (bin2ip(segment).startswith('195.22.105.') and int(bin2ip(segment).split('.')[-1]) > 100):
output = login + ";" + bin2ip(segment) + ";" + name + ";" + street + " " + bnum + "-" + apart
print output.encode('utf8')