We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c6f019 commit eb99235Copy full SHA for eb99235
1 file changed
examples/tweet.py
@@ -9,6 +9,7 @@
9
import os
10
import sys
11
import twitter
12
+from __future__ import print_function
13
14
15
USAGE = '''Usage: tweet [options] message
@@ -142,10 +143,8 @@ def main():
142
143
print "Your message could not be encoded. Perhaps it contains non-ASCII characters? "
144
print "Try explicitly specifying the encoding with the --encoding flag"
145
sys.exit(2)
- print "%s just posted: %s" % (status.user.name, status.text)
146
- # updated way to print if you are using python 3:
147
- # print ("{} just posted: {}".format(status.user.name, status.text))
148
-
+
+ print("{0} just posted: {1}".format(status.user.name, status.text))
149
150
if __name__ == "__main__":
151
main()
0 commit comments