def random_ip():
 network = random.choice(['192.0.2', '198.51.100', '203.0.113'])
 ip_address = '{}.{}'.format(network, random.randrange(256))
 return ip_address

def random_ip ( ) : network = random . choice ( [ '192.0.2' , '198.51.100' , '203.0.113' ] ) ip_address = '{}.{}' . format ( network , random . randrange ( 256 ) ) return ip_address
choose a random example ip address .