hello,
I want to compare 2 strings.I want to find if a list with characters contains all the letters in a string.
If all the letters in the string are in the list.
For example:
mystring='abc'
mylist=['a','b','c'] must return Truemystring='abc'
mylist=['a','c','b'] must return Truemystring='abc'
mylist=['a','f','c'] must return False
I am trying:
for i in range(len(mylist)):
if mylist[i] in mystring:
return True
else:
return False
but it doesn't work as expected.I can't isolate every letter.