diff --git a/Differences in Python 2 and Python 3.md b/Differences in Python 2 and Python 3.md new file mode 100644 index 0000000..4afa887 --- /dev/null +++ b/Differences in Python 2 and Python 3.md @@ -0,0 +1,11 @@ +## Differences Between Python 2 and Python 3 + +|Sn|Python 2|Python 3| +|:-|:-------|:-------| +|1|print function brackets optional.|print() function brackets necessary.| +|2|Prefix the string with u to make Unicode String. Ex: u"hello world"| String is Unicode by default.| +|3|Division of integers always return integer.|Division of integers return double answer, if required.| +|4|raw_input() reads string|raw_input() not available and not required. Every input is string.| +|5|input() evaluates data read.|input() always reads string.| +|6||as keyword| +|7|Going next value in a generator. Syntax: generator.next()|Going next value in a generator. Syntax: next(generator)|