Skip to content

Instantly share code, notes, and snippets.

@PoplarYang
Created April 11, 2019 07:11
Show Gist options
  • Select an option

  • Save PoplarYang/92d4ddfe13892e850da516f63d20e2fc to your computer and use it in GitHub Desktop.

Select an option

Save PoplarYang/92d4ddfe13892e850da516f63d20e2fc to your computer and use it in GitHub Desktop.
print 从 python2 到 python3
python2 不打印换行,在 print 的行尾加",",在 python2 体验python3 print,可以使用:
from __future__ import print_function
python3 print
print("a", "b", sep=" ", end="\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment