import sys
import os
import subprocess

with open('ip.txt', 'r') as file:
array = file.readlines()
for line in array:
    os.system("adb connect" {0}.format(line))

so i would want to give 1s time to adb try to connect ip because if its down, it took very long until it tries to connect another ip. Btw my english is pretty bad 🙂