Python get output of multiple network device using ciscoconfparse

I need help to get the result which i am getting using below script in different way. I have multiple devices so cant repeatedly type for each and every device will take lot of time. So i am pulling the device details from a text file but unable to generate result the way i am getting in the below script.

Below Script is giving exact output which i am looking for.

from netmiko import ConnectHandler
import pandas as pd
from ciscoconfparse import CiscoConfParse
#username and password
user = 'chris'
password = 'cathy'

#First Device
Device1 = {'device_type': 'cisco_ios', 'ip': '', 'username': user, 'password': password, 'port': 22}
net_connect = ConnectHandler(**Device1)
output = net_connect.send_command("show run")
cfg = output.split('\n')
parse = CiscoConfParse(cfg)
interface = parse.find_objects(r"^interface.+?thernet")
chn = list()
for inter in interface:
    if inter.re_search_children(r"dot1x"):
        chn.append((inter.text, "dot1x Enabled"))
        chn.append((inter.text, "dot1x Disabled"))

# Second Device
Device2 = {'device_type': 'cisco_ios', 'ip': '', 'username': user, 'password': password, 'port': 22}
net_connect1 = ConnectHandler(**Device2)
output1 = net_connect1.send_command("show run")
cfg1 = output1.split('\n')
parse1 = CiscoConfParse(cfg1)
interface1 = parse1.find_objects(r"^interface.+?thernet")
chn1 = list()
for inter1 in interface1:
    if inter1.re_search_children(r"dot1x"):
        chn1.append((inter1.text, "dot1x Enabled"))
        chn1.append((inter1.text, "dot1x Disabled"))

#Export CSV using Pandas

csv_path = 'RESULT.xlsx'
Device1_csv = pd.DataFrame(data=chn, columns=('Interface', 'Dot1x'))
Device2_csv = pd.DataFrame(data=chn1, columns=('Interface', 'Dot1x'))
device_con = pd.concat(dict(Device1=Device1_csv,Device2=Device2_csv),axis=1)
writer = pd.ExcelWriter(csv_path, engine='xlsxwriter')
device_con.to_excel(writer, sheet_name='Devices')

Successful Result

I am trying to get the same result of the above script, but unable to get. please help !

from netmiko import ConnectHandler
from ciscoconfparse import CiscoConfParse
import pandas as pd

with open('C:/Users/ssamy/Desktop/device.txt', 'r') as f:
    device_list =
UN = 'chris'
PW = 'cathy'
for devices in device_list:
    print('Connecting to the Device: ' + devices)
    ip_address_of_device = devices
    switch = {'device_type': 'cisco_ios', 'ip': ip_address_of_device, 'username': UN, 'password': PW, 'port': 22}
    connect = ConnectHandler(**switch)
    output = connect.send_command_expect('show run')
    cfg = output.split('\n')
    parse = CiscoConfParse(cfg)
    interface = parse.find_objects(r"^interface.+?thernet")
    all = []
    for inter in interface:
        if inter.re_search_children(r"dot1x"):
            all.append((inter.text, "dot1x Enabled"))
            all.append((inter.text, "dot1x Disabled"))

        excel_path = 'ciscointerface.xlsx'
        path = pd.DataFrame(data=all, columns=('Interface', 'Dot1x'))
        writer = pd.ExcelWriter(excel_path, engine='xlsxwriter')
        path.to_excel(writer, sheet_name='Devices', index=False, encoding='utf-8')