python print, string manipulation summary

  Version difference python 3.x: print() is function and not a keyword anymore. () must be used.

python 2.x: print is considered as a keyword, so () is not necessary.

The above syntax cannot be used in python 3! But you can use future module import if you want to use print as a function for python 3 compatibility.

Summary: It is better to use print() for future compatibility from now on. Ref: What is __future__ in Python used for and how/when to use it, and how it works __future__ モジュールについて Single quotation and double quotation for string There is no difference between ‘word’ and “word” in […]

Continue reading →