SOLVED (Idk how to explain) Python read text file and run func at each number?

Hello! Does anybody know how to make python in armory3d read a text file and then run a different function after it reads each number? (Ex: 10201
The 1 would run a function and then the 0 would run a. Different function, then 2 same thing, and then 0 and then 1)

NVM I found it on another forum… lol

Here it is in case anybody finds this:

with open(filename) as f:
while True:
c =
if not c:
print “End of file”
print “Read a character:”, c