I need to copy a variable and make changes to it. I've alredy seen this, but i want the oposite. In this code i need the returned tuple to be two different lists, not the same.
def getIPRange(self):
group = [0, self.getJoinedNetworks() - 1]
while True:
if self.ip[2] > group[0] and self.ip[2] < group[1]:
res_ip_min = self.ip #self.ip is for example [70, 30, 20, 0]
res_ip_min[2] = group[0]
res_ip_min[3] = 1
res_ip_max = self.ip
res_ip_max[2] = group[1]
res_ip_max[3] = 254
return (res_ip_min, res_ip_max)
else:
group[0] = group[1] + 1
group[1] = group[0] + self.getJoinedNetworks() - 1