skiingpenguins | 2013-01-18 18:12
Compare two lists
11
points ]
 (2 votes)

Okay, so I am trying to compare two lists to see if they contain the same string.

mylist = "aunt uncle grandma"
mylist2 = "fish cheese aunt"

loop i (listlen $mylist) [ loop u (listlen $mylist2) [ if (= (at $mylist $i) (at $mylist2 $u)) [echo Yes] [echo no] ] ]

I thought I could just use a loop to loop through the first list, then compare that to the second one, which I loop through at the same time.

11
points
 (2 votes)
User login
Users on Quadropolis
2 guests & no users online
20
points ]
 (2 votes)
Created 2020-12-20 03:04
1 week 5 days ago
19
points ]
 (2 votes)
Created 2020-12-10 12:49
3 weeks 1 day ago
30
points ]
 (3 votes)
Created 2020-12-04 12:05
4 weeks 5 hours ago
20
points ]
 (2 votes)
Created 2020-12-03 17:12
4 weeks 1 day ago
30
points ]
 (3 votes)
Created 2020-06-13 21:05
28 weeks 5 days ago
30
points ]
 (3 votes)
Created 2020-11-30 04:00
4 weeks 4 days ago
50
points ]
 (5 votes)
Created 2020-01-23 12:57
49 weeks 1 day ago
68
points ]
 (7 votes)
Created 2020-10-11 13:46
11 weeks 5 days ago
64
points ]
 (7 votes)
Created 2018-12-04 15:12
2 years 4 weeks ago
Gangler
36
points ]
 (4 votes)
Created 2020-10-22 00:50
10 weeks 1 day ago
LURKing
13
points ]
 (2 votes)
Created 2020-11-22 21:21
5 weeks 4 days ago
LURKing
37
points ]
 (4 votes)
Created 2020-11-18 21:08
6 weeks 1 day ago
Shuzomi
30
points ]
 (3 votes)
Created 2020-11-15 18:16
6 weeks 4 days ago
Im_Percynator
Created 2020-11-15 07:21
6 weeks 5 days ago
micai
24
points ]
 (3 votes)
Created 2020-11-11 18:27
7 weeks 1 day ago
afroninja
56
points ]
 (6 votes)
Created 2020-01-15 07:47
50 weeks 2 days ago
LURKing
30
points ]
 (4 votes)
Created 2020-10-15 20:38
11 weeks 21 hours ago
31
points ]
 (4 votes)
Created 2020-10-15 20:20
11 weeks 21 hours ago
10
points ]
 (1 vote)
Created 2020-09-15 02:22
15 weeks 3 days ago
8
points ]
 (2 votes)
Created 2020-09-12 23:14
15 weeks 5 days ago
Who's new
  • WASP
  • Im_Percynator
  • micai
  • Hypercycle
  • Getridou