- or download this
alphas = [9, 4, 3, 2, 22, 13, 7, 140, 95, 278]
betas = [8, 3, 4, 1, 278, 94, 15, 7, 19, 200]
result = (alphas & betas).sort
- or download this
alphas = [9, 4, 3, 2, 22, 13, 7, 140, 95, 278]
betas = [8, 3, 4, 1, 278, 94, 15, 7, 19, 200]
...
result.append(x)
result.sort()
- or download this
result = filter(lambda y: y != 0, [x in betas and x for x in alphas])
result.sort()
- or download this
@result = sort { $a <=> $b }
map { my $x = $_; grep $x == $_, @betas } @alphas;