操作系统:Ubuntu16.04
错误代码(TypeError: object of type 'Quitter' has no len())
#-*-conding:utf-8-*- while True: s = input('Enter something :') if s == 'quit': break print('length of the string is',len(s)) print('Done')
第一次使用Python运行的时候,版本不对,这样的代码如果用Python2运行就会出错,在Python3就不会。