Articles tagged with the tag 
Caching expensive operations in python

Caching expensive operations in python

You have a function that takes a lot of time to execute. You need to call that function frequently, at different points in your code with the same arguments. This expensive function seems to be …

  Read more
Use named tuples to stop yourself from remembering order of tuples

Use named tuples to stop yourself from remembering order of tuples

Let's consider an example where you're returning some info about a Person object from a function in the form of a tuple.

def info():
    ...
    return name, address, age

Now, in this scenario the receiving …

  Read more
Conditional Statements in Python

Conditional Statements in Python

To solve any problem in computer science, we define an algorithm, which is - a finite sequence of well-defined, computer-implementable instructions. We've performed basic mathematical and textual operations in Python. But many tasks require decision making …

  Read more
Getting User Input in Python

Getting User Input in Python

If you're trying to create something in which you require input from a user, like a simple calculator, you can use the input method provided by Python.

Input function

Python has a built-in function - …

  Read more
6 Awesome Python Libraries for GUI Development

6 Awesome Python Libraries for GUI Development

Python is a general-purpose programming language. No matter in which field you're working there are some libraries which you'll find useful. In this article, we'll see 8 awesome Python libraries that you'll find helpful in …

  Read more
Python String Methods

Python String Methods

Dealing with strings is a very common task in programming. Python makes it very easy by providing us tons of useful functions. The following are the list of all built-in methods for strings.

String Methods …

  Read more
10 Awesome Open-Source Python Projects

10 Awesome Open-Source Python Projects

Github is home to over 100 million projects and is used by over 40 million developers. It hosts the source code of the project that is shaping the technology world like Linux kernel, Python, TensorFlow, …

  Read more
An awesome django filter for displaying numbers

An awesome django filter for displaying numbers

Displaying large numbers like 1234, 1243423, etc in their raw form can be less intuitive for viewers. Such large numbers make it difficult to calculate the actual value of the number.

Hence I thought …

  Read more
Relative imports in python

Relative imports in python

If you have ever built a project that requires you to put your codes in different python files, you surely have had to go through building modules and packages. This generally helps in better maintenance …

  Read more
Python Docstrings

Python Docstrings

Introduction

Guido van Rossum(creator of Python) said

"Code is read much more often than it is written."

It is reflected in the design of Python that how much emphasis does it give to docstring. There …

  Read more