≡ Menu

Python

REST stands for Representational State Transfer. It is an architectural style, set of rules to standardize the web, to maintain uniformity across web applications worldwide. It intends to enhance maintainability, scalability, reliability and portability of web applications. Main idea behind REST is resources. Everything you want to access in a web application is a resource, [...]

{ 2 comments }

15 Practical Python Set Examples with a Sample Program

Sets are basically collection of certain items that are unordered. There is no specific order in which they are stored. In Python sets are same, but there are few differences with basic sets. The elements in python sets are unique, there can’t be duplicate items in python sets. If duplicate items entered, it will be [...]

{ 1 comment }

17 Practical Python Tuples Examples

Tuple is similar to List in python language, both are sequential, index based data structure. The main difference between tuples and list is that tuples are immutable i.e. we cannot modify a tuple’s content but List is mutable data structure. Also, tuples uses parenthesis and list uses square brackets. This article will discuss about following [...]

{ 1 comment }

OOP stands for Object Oriented Programming. This concept is a style of solving programming problems where properties and behavior of a real-life object is packaged as a single entity in the code. This style of coding enables modularizing and scaling with least amount of issues. Python is a dynamically typed, high level interpreted programming language. [...]

{ 1 comment }

12 Essential Python For Loop Command Examples

For loop is an essential aspect of any programming language. In python, for loop is very flexible and powerful. In this tutorial, we've explained the following Python for loop examples. Python For Loop for Numbers Python For Loop for Strings Python For Loop Using Default Range Function Python For Loop With Custom Start and End [...]

{ 5 comments }

9 Python if, if else, if elif Command Examples

Similar to other programming languages, in Python, conditional situations can be handled using if command. In this tutorial, we've explained the following with examples: Basic Python if Command Example for Numbers Python if Command Operators Basic Python if Command Example for String Comparison Multiple Commands in If Condition Block using Indentation Python if else Command [...]

{ 0 comments }

How to Connect to MySQL Database from Python With Example

From a Python program, you can connect to MySQL database to access the tables and manipulate your data. For this, you should use one of the Python MySQL Libraries. While there are few of these libraries available, the most popular and stable is mysql-connector-python library. The mysql-connector-python library uses APIs that are complaint with the [...]

{ 7 comments }

In the past few articles in the Python series, we've learned a lot about working with regular expressions in Python. In this article, we'll explain how we could use python regular expressions for a realistic task. We'll do a step by step walk through on how we can build Python data structures from formatted flat [...]

{ 3 comments }