Compruebe si dos listas desordenadas son iguales [duplicado]
Esta pregunta ya tiene una respuesta aquí:
¿Cómo comparar eficientemente dos listas desordenadas (no conjuntos) en Python? 9 respuestasEstoy buscando una manera fácil (y rápida) de determinar si dos desordenadoas listas @ contienen los mismos elementos:
Por ejemplo
['one', 'two', 'three'] == ['one', 'two', 'three'] : true
['one', 'two', 'three'] == ['one', 'three', 'two'] : true
['one', 'two', 'three'] == ['one', 'two', 'three', 'three'] : false
['one', 'two', 'three'] == ['one', 'two', 'three', 'four'] : false
['one', 'two', 'three'] == ['one', 'two', 'four'] : false
['one', 'two', 'three'] == ['one'] : false
Espero hacer esto sin usar un mapa.