isActiveData = isActive["Data"]
isActiveDataLen = len(isActiveData)
if isActiveDataLen > 0:
while isActiveDataLen > 0:
isActiveDataLen -= 1
print (isActiveDataLen)
Result
10 9 8 7 6 5 4 3 2 1 0
if isActiveDataLen > 0:
while isActiveDataLen > 0:
isActiveDataLen -= 1
return (isActiveDataLen)
Result
10
I have a program like this. But with print, I can extract the numbers I want from the while loop. When I use return, the while loop only works once and I cannot continue the program. How can I solve the problem?