mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 16:27:02 +00:00
Use strip() to deal with leading or trailing whitespace
This commit is contained in:
parent
ee3b0f2e50
commit
bec160c6dc
|
@ -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
|
||||
|
@ -100,7 +100,7 @@ for chunk in message:
|
|||
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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user