Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Differences in Python 2 and Python 3.md
Original file line number Diff line number Diff line change
@@ -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)|