Python reads only last line in text file
问题 I am trying to read 2 IP address from text file and connect these devices and run the "conf t" command on these devices. When i trying to do this job by following coding, python reads only last line in text file, not reading the first line. What should i do? Thanks. import paramiko username = "xxxx" password = "yyyy" f = open("C:\\Users\0\Desktop\\deneme.txt") for line in f: ip_address = line.strip() ssh_client = paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko