Category python3-tutorial

Python 3 Network Programming

Python 3 Network Programming Python provides two levels of network service access: The low-level network service supports basic sockets, providing the standard BSD Sockets API and access to all methods of the underlying operating system’s socket interface. The high-level network…

Python 3 regular expressions

Python 3 Regular Expressions A regular expression is a special sequence of characters that helps you easily check whether a string matches a pattern. Python has added the re module since version 1.5, which provides Perl-style regular expression patterns. The…

Python 3 JSON data parsing

Python 3 JSON Data Parsing JSON (JavaScript Object Notation) is a lightweight data-interchange format based on a subset of ECMAScript. In Python 3, you can use the json module to encode and decode JSON data. It contains two functions: json.dumps():Encodes…

Python 3 Annotations

Python 3 Comments Ensure proper style is used for module, function, method, and inline comments Comments in Python can be either single-line or multi-line: Single-line comments in Python begin with #, for example: <code># This is a comment print("Hello, World!")…

Python 3 namespace and scope

Python 3 Namespaces and Scopes Namespaces First, let’s take a look at this passage from the official documentation: A namespace is a mapping from names to objects. Most namespaces are currently implemented as Python dictionaries. A namespace is a mapping…

Python 3 environment setup

Setting Up a Python 3 Environment This section explains how to set up a local Python 3 development environment. Python 3 is available on multiple platforms, including Windows, Linux, and Mac OS X. Unix (Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS,…