In practice, you need to check that the attempted connection has worked. The connect method returns at once and usually before the connection has been made. Ideally you would select a connection ...
Finally hidden is False if the access point is broadcasting its SSID and True if not. To display the WiFi access points in range you could use: import network wifi = network.WLAN(network.STA_IF) ...