From 7d924a740e98e3f2d5d56d72df3a6de17eb21a49 Mon Sep 17 00:00:00 2001 From: Paulo Truta Date: Mon, 18 Mar 2024 13:37:32 +0100 Subject: [PATCH] Test --- test/index.html | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 test/index.html diff --git a/test/index.html b/test/index.html new file mode 100644 index 0000000..fe23c8f --- /dev/null +++ b/test/index.html @@ -0,0 +1,90 @@ + + + + + +Python 3 vs Python 2 Presentation + +
+
+

Introduction to Python 3 vs Python 2 🐍🆚

+

Overview
+ Python 2 was released in 2000, Python 3 in 2008.
+ Python 3 is not backward compatible with Python 2.
+ As of January 1, 2020, Python 2 has been officially retired.

+
+
+

Print Function 🖨️

+

Python 2
+ print "Hello, world!"
+ Python 3
+ print("Hello, world!")
+ Key Difference
+ Python 3 requires parentheses.

+
+
+

Integer Division 🧮

+

Python 2
+ 3 / 2 equals 1
+ Python 3
+ 3 / 2 equals 1.5
+ Key Difference
+ Python 3 performs true division by default.

+
+
+

Unicode Support 🌍

+

Python 2
+ Strings are ASCII by default.
+ Unicode string with u"Hello"
+ Python 3
+ Strings are Unicode by default.
+ Key Difference
+ Enhanced Unicode support in Python 3.

+
+
+

Input Function 📥

+

Python 2
+ raw_input() for user input as string.
+ input() evaluates the input as Python code.
+ Python 3
+ input() for user input, always returns the input as a string.
+ Key Difference
+ input() in Python 3 does not evaluate the input.

+
+
+

Libraries and Packages 📚

+

Both Versions
+ Wide range of libraries and packages.
+ Python 3
+ More libraries are now Python 3 compatible.
+ Focus on Python 3 for future development.
+ Key Point
+ Transition to Python 3 for better library support.

+
+
+

Conclusion 🏁

+

Transition to Python 3
+ Strongly recommended for new projects.
+ Active development, better library compatibility.
+ Legacy Python 2 Code
+ Consider porting to Python 3 for long-term maintenance.

+
+
+

Resources 📖

+

Official Python Documentation
+ Python 2: https://docs.python.org/2/
+ Python 3: https://docs.python.org/3/

+
+
+ + +