HI, I am a real beginner, so please, be gentle:)
I wrote a short programm:
Thanks in advance
I wrote a short programm:
bits_string = "01010102" bits = ["0", "1"] bits_list = [] for i in bits_string: bits_list.append(i) result = all(i in bits_list for i in bits) print(result)And the outcome is:
Output:['0', '1', '0', '1', '0', '1', '0', '2']
True
I mean, why is it "TRUE"? "2" is not present in list "bits".Thanks in advance

buran write Jan-29-2021, 11:36 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.