Advertisement
Ractangle

Queue-based esolang implementation (with an aditional command)

Dec 10th, 2024 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. print("AQBE");p=0;c=input();Q=[]
  2. while len(c)>p:
  3.  if c[p]=="p":Q.append(c[p+1]);p+=1
  4.  elif c[p]=="q":Q.pop(0)
  5.  elif c[p]=="Q":print(Q.pop(0),end="")
  6.  elif c[p]=="!":
  7.   while c[p]!="!":p+=1
  8.  elif c[p]=="}":
  9.   if not Q:...
  10.   else:
  11.    while c[p]!="{":p-=1
  12.  p+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement