Q. Difference between Boolean array and List with only 0 and 1

  1. I tried to identify the data type of a boolean variable but it shows class ‘type’ not ‘boolean’, why’s that?
  2. Can I take it that the logic( how it works or what rule it follows) behind a boolean and a list is completely different?
  3. How does the computer recognize a boolean array from a bunch of lists with only 0’s and 1’s?
  4. Why do lists cost a lot more time and space than arrays, is it because arrays can do vectorization calculation?

Sorry I had so many questions but really appreciate it for your detailed explanation!


Hey @gaoweidong999,

I have try to answer couple of your queries with examples. hope this helps.

Happy learning.

1 Like