Is there any builtins to check if a list is contained inside another list without doing any loop?
I looked for that in dir(list)
but found nothing useful.
List within another list either order list or unordered list is called nested list.
Depends on what you mean by "contained". Maybe this:
if set(a) <= set(b): print("a is in b")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With