方法containsObject:
和indexOfObject:
NSString * str = @"Python";
NSArray * arr = @[@"C", @"OC",@"Ruby",@"Python"];
BOOL isContains = [arr containsObject:str];
if (isContains) {
NSInteger index = [arr indexOfObject:str];
NSLog(@"index为:%ld",(long)index);
}else {
NSLog(@"不存在index")
}