#lists ig

1 messages · Page 1 of 1 (latest)

split cargo
#

so as an example let’s say i have two lists list #1 has {2, 4, 6, 7} and list #2 has {2, 4, 6, 8,}. how would i check to make sure that list #1 doesn’t have any numbers that aren’t in list #2? so in the situation it would return false because the 7 is not in list #2. hope this makes sense 😭

empty grove
split cargo
#

i can’t sorry :/

empty grove
#

Mk

#

Tmr?

split cargo
#

yea but u can’t do an equals because if list one didn’t have the 6 or the 7 i would want it to return true

empty grove
#

U could split up the numbers and run a check individually

vernal thicket
#

There’s a new chip that removes any duplicates in a list

runic jolt
#

List Except outputs a new list of items List 1 has, that List 2/3/4/etc does not.

List Union concats all lists, but removes any duplicate values.

List Intersect outputs a list with values that all lists contain.

List Distinct removes any duplicate values from the lists.

#

====================
List Intersect (or List Except if you are comparing purely List 1 to every other input list) is the one you will one to use. By using this with your lists, check if the new list has no items using a List Get Count or by checking if it is Equals to an empty List Create. If the list has no items, then both lists have the exact same values inside but may or may not be in the same element order.