Data={
0:{
'country1': "Ryan lives in America",
'country_one': "5",
'med_dict':{
0: {
'endDate': "732",
'endTime': "89",
}
},
},
1: {
'country1': "Sam lives in america",
'country_three': "90",
'med_dict': {
0: {
'endDate': "245",
'endTime': "222",
}
},
}
}
res = [v1['country1'] for k1, v1 in Data.items()]
print(res)
I have got the output as ['Ryan lives in America', 'Sam lives in america'].
I want to print True if word 'America/america' is present in both the string or else print False. Need to check for the case sensitivity as lower or upper. How to do it?