Execute HQ9+/Python: Difference between revisions

Content added Content deleted
m (Fixed syntax highlighting.)
Line 3: Line 3:
This [[Python]] example implements 'H', 'Q', '9' and '+'.
This [[Python]] example implements 'H', 'Q', '9' and '+'.


<lang python>import sys
<syntaxhighlight lang="python">import sys


def hello():
def hello():
Line 65: Line 65:
for i in src.lower():
for i in src.lower():
if i in dispatch:
if i in dispatch:
dispatch[i]()
dispatch[i]()</syntaxhighlight>