mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 16:27:02 +00:00
Properly define raw_input)( in Python 3
__raw_input()__ was removed in Python 3 in favor of __input()__. This change ensure similar functioning in both Python 2 and Python 3.
This commit is contained in:
parent
d4b4b7ba35
commit
ee3b0f2e50
|
@ -2,10 +2,9 @@
|
|||
from __future__ import print_function
|
||||
|
||||
try:
|
||||
raw_input
|
||||
input = raw_input
|
||||
except:
|
||||
pass
|
||||
raw_input # Python 2
|
||||
except NameError:
|
||||
input = raw_input # Python 3
|
||||
|
||||
# Chaos Machine (K, t, m)
|
||||
K = [0.33, 0.44, 0.55, 0.44, 0.33]; t = 3; m = 5
|
||||
|
|
Loading…
Reference in New Issue
Block a user