I have a tuple of a tuple (ServerList) that contains the following:
<host1>,DEV,Inf ormatica,Red_Ha t,64
<host2>,PROD,In formatica,Red_H at,64
<host3>,PROD,In formatica,Red_H at,64
<host4>,QA,Info rmatica,Red_Hat ,64
<host5>,PROD,Ti bco,Solaris,
<host6>,TEST,Ti bco,Solaris,
I have a list (EnvList) that could contain the following:
['PROD','Informa tica','Red_Hat' ,'64']
or any combination.
Using the the example above I want to create a list which contains:
['<host2>','<hos t3>']
I am hoping for something like
How can this be actually done?
<host1>,DEV,Inf ormatica,Red_Ha t,64
<host2>,PROD,In formatica,Red_H at,64
<host3>,PROD,In formatica,Red_H at,64
<host4>,QA,Info rmatica,Red_Hat ,64
<host5>,PROD,Ti bco,Solaris,
<host6>,TEST,Ti bco,Solaris,
I have a list (EnvList) that could contain the following:
['PROD','Informa tica','Red_Hat' ,'64']
or any combination.
Using the the example above I want to create a list which contains:
['<host2>','<hos t3>']
I am hoping for something like
Code:
for i in ServerList:
if i contains EnvList:
ServerName.append(ServerList[0])
Comment