I have a.py :
Class boxfinitestatemachine(models):
.....
@transistion...
def hello(self):
Print happy
....
@transostion..
def bye(self):
Print sad
....
Normally this would get run as : press F5 & in shell window, give commands as:
>>>State= boxfinitestatemachine() #input
>>> State.hello() #input
>>> happy #output
>>> State.bye() # input
>>> Sad #output
Now I have anothe file b.py, which includes FOR loop function as:
For I in range 2:
Now I require , if I==0, state.hello have to get executed & happy should be printed.
Similarly for I==1, state.bye should be executed & Sad should be printed.
How to perform this requirement. Any help pls.