Any other way to perform this operation? :  

    for i in range(0, 2 ** 24):
    byte3 = i & 0xff
    byte2 = i & 0xff00
    byte1 = i & 0xff0000
    byte0 = i & 0xff000000
    print('%d.%d.%d.%d' % (byte0 >> 24, byte1 >> 16, byte2 >> 8, byte3))

#I request you make a proper program since I am new to python :) Thanks in advance