This script spins up the Pico W as a Wifi Access Point. It assigns itself the IP 192.168.4.1 and assigns new Clients some IP starting at 192.168.4.16 or so.
import network
from machine import Pin
led = Pin("LED", Pin.OUT)
ap = network.WLAN(network.AP_IF)
ap.active(0)
ap.config(essid="pico", password="picopicopico", channel=1)
ap.active(1)
print("Connection successful")
print(ap.ifconfig())
if ap.active():
led.on()