浏览代码

updated to python 3 code

raw input -> input
print' ' -> print(' ')
dbojan 9 年之前
父节点
当前提交
984404e93d
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      programs/continue.py

+ 3 - 3
programs/continue.py

@@ -1,9 +1,9 @@
 while True:
-    s = raw_input('Enter something : ')
+    s = input('Enter something : ')
     if s == 'quit':
         break
     if len(s) < 3:
-        print 'Too small'
+        print('Too small')
         continue
-    print 'Input is of sufficient length'
+    print('Input is of sufficient length')
     # Do other kinds of processing here...