CREATE TABLE public.somegame
(
id serial PRIMARY KEY NOT NULL,
game varchar(50) NOT NULL,
players int[]
);
CREATE UNIQUE INDEX somegame_id_uindex ON public.somegame (id);
CREATE UNIQUE INDEX somegame_game_uindex ON public.somegame (game);
import ipaddress
START_IP = ipaddress.ip_address(u'192.168.0.11')
def display_mac_ip(mac_addresses):
for index, mac_address in enumerate(mac_addresses):
print('MAC {}\nIP {}\n'.format(mac_address, START_IP + index))
if __name__ == '__main__':
input_raw_data = input()
display_mac_ip(input_raw_data.split(' '))
import ipaddress
mac_addresses = ['aa:bb:cc:aa:bb:11', 'aa:bb:cc:aa:bb:12', 'aa:bb:cc:aa:bb:13', 'aa:bb:cc:aa:bb:14', 'aa:bb:cc:aa:bb:15']
start_ip = ipaddress.ip_address('192.168.0.11')
for index, mac_address in enumerate(mac_addresses):
print(f'MAC {mac_address}\nIP {start_ip + index}\n')
MAC aa:bb:cc:aa:bb:11
IP 192.168.0.11
MAC aa:bb:cc:aa:bb:12
IP 192.168.0.12
MAC aa:bb:cc:aa:bb:13
IP 192.168.0.13
MAC aa:bb:cc:aa:bb:14
IP 192.168.0.14
MAC aa:bb:cc:aa:bb:15
IP 192.168.0.15