Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- memory = list(input())
- q = 'q1'
- idx = 0
- R, L, N = 1, -1, 0
- table = {
- 'q1': {}, 'q2':{}
- }
- while q != 'qT':
- sym, move, state =
- = table[q][memory[idx]]
- memory[idx] = sym
- idx += move
- q = state
- for i in memory:
- print(i, end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement