I am beginner in python and I am trying to write something like this in objective-c. In Objective-C, each method can be stored in block and those can be called again later. I have tried to find online but I don't know keyword in python. Can I write like that in python or is there any similar flow ? How shall I do?
void (^successBlock)() = ^{
NSLog(@"Test");
};
NSMutableArray *muArr = [NSMutableArray array];
[muArr addObject:successBlock];
for (void (^successBlock)() in muArr) {
successBlock();
}