I am new to Python. i am using Spyder (pandas and numpy) to run an algorithm for data analysis. This requires implementation of an RS flip flop on two variables in the data. something like this in C:
((R_b) != FALSE) ? (*(State_pb) = FALSE) : (((S_b) != FALSE) ? (*(State_pb) = TRUE) : *(State_pb));
Here R_b is the R input to the flip-flop and S-b is the S input. Note the use of pointer to the previous state of the flip flop to retain previous state . Could this be implemented in Python as well?