Convert the following list to a set
List<String> a = new List<String>{'A','B','C','A','C','A'};
DEBUG|Set: {A, B, C}
List<String> a = new List<String>{'A','B','C','A','C','A'}; Set<String> b = new Set<String>(a); System.debug('Set: ' +b);