TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
问题 So I am VERY new to programming and I started with Python 3. I started reading "Learn Python the Hard Way". Now, I got to a point where I had this code: x = "There are %d types of people." % 10 binary = "binary" do_not = "don't" y = "Those who know %s and those who %s" % (binary, do_not) print(x) print(y) print("I said: %r") % x I do not really know the difference between %r , %s and %d . The error I get is TypeError: unsupported operand type(s) for %: 'NoneType' and 'str' No idea what to do