Please note, if you're asking how your code should be modified to support nested loops or reading from a file, ...that's changing what the code does, not how it's doing it.
–
Mat's Mug♦Jul 25 '14 at 18:16

1 Answer
1

This being Python, it should be relatively easy to present the illusion of an infinite tape, at least in the positive direction. I don't see reason that cell_amount has to be specified, and the user shouldn't have to worry about such details.

Your input and output routines are wrong:

The . instruction should print one character, interpreting the cell value as an ASCII code. Instead, you print the cell value as a base-10 number, followed by Newline.

The , instruction should read one character, storing its ASCII code as the cell value. Instead, you read a string, and try to parse it as an integer.

while True: … is a lie. What you really mean is while step < steps: …. Then you can get rid of the if step == steps: exit(0) at the end of the loop.