Python: Deleting multiple items from a list

#Python: Deleting multiple items from a list
a1 = [5,11,1,9];
a2 = [2,5,9,11,18];
a3 = a1 + a2; #[5, 11, 1, 9, 2, 5, 9, 11, 18]
a4 = sorted(set(a3), key=a3.index); #[5, 11, 1, 9, 2, 18]

Comments

Popular posts from this blog

HIK: Getting current character and current source.