Skip to content

Commit

Permalink
Use strip() to deal with leading or trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jul 3, 2018
1 parent ee3b0f2 commit bec160c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hashes/chaos_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from __future__ import print_function

try:
raw_input # Python 2
input = raw_input # Python 2
except NameError:
input = raw_input # Python 3
pass # Python 3

# Chaos Machine (K, t, m)
K = [0.33, 0.44, 0.55, 0.44, 0.33]; t = 3; m = 5
Expand Down Expand Up @@ -100,7 +100,7 @@ def reset():
inp = ""

# Pulling Data (Output)
while inp != "e" and inp != "E":
while inp in ("e", "E"):
print("%s" % format(pull(), '#04x'))
print(buffer_space); print(params_space)
inp = input("(e)exit? ")
inp = input("(e)exit? ").strip()

0 comments on commit bec160c

Please sign in to comment.