Maybe this is normal behaviour for using ANSI, but below I have a list of string variables. One of which I want a different colour. If I try to use ANSI to change the colour of the string variable, it no longer recognizes it.
a="\033[92m a"
#a="a"
list1 = [a, "b", "c", "d", "e"]
list2=[]
for i in list1:
if i=="a":
list2.append(i)
print(list2)
RESULT : []
Now if I get rid of the ANSI, it works
#a="\033[92m a"
a="a"
list1 = [a, "b", "c", "d", "e"]
list2=[]
for i in list1:
if i=="a":
list2.append(i)
print(list2)
RESULT : ['a']
Any ideas on how to make it work with colours?