Don't wanna be here? Send us removal request.
Text
Designing Intelligent Python Dictionaries
Designing Intelligent Python Dictionaries
Last week while working on a hobby project, I encountered a very interesting design problem: How do you deal with wrong user input?
Let me explain.
Dictionaries in Python represent pairs of keys and values. For example:
student_grades = {'John': 'A', 'Mary': 'C', 'Rob': 'B'} # To check grade of John, we call print(student_grades['John']) #…
View On WordPress
0 notes
Text
Understand of Garbage-Collection Algorithms in Python

In languages like C or C++, the programmer is responsible for the dynamic allocation and deallocation of memory on the heap. But in Python, programmers don’t have to preallocate or deallocate memory.
Python uses the following garbage-collection algorithms for memory management:
Reference counting
A cycle-detecting algorithm (circular references)
Reference Counting
Reference counting is…
View On WordPress
0 notes
Text
Understanding the underscore( _ ) in Python
Single and double underscores have a meaning in Python’s variable and method names.
In this article, we’ll discuss the five underscore patterns and how they affect the behavior of Python programs. Understanding these concepts will help a lot, especially when writing advanced code.
Single leading underscore: _var
Single trailing underscore: var_
Double leading underscore: __var
Double leading…
View On WordPress
0 notes
Text
Understand and Use *args and **kwargs in Python
The special syntax *args in function definitions in python is used to pass a variable number of arguments to a function. It is used to pass a non-keyworded, variable-length argument list.
The syntax is to use the symbol * to take in a variable number of arguments; by convention, it is often used with the word args.
What *args allows you to do is take in more arguments than the number of…
View On WordPress
0 notes
Text
The Updated Guide to Unicode, UTF-8, and Strings on Python
The Updated Guide to Unicode, UTF-8, and Strings on Python
Strings are one of the most common data types in Python. They are used to deal with text data of any kind. The field of Natural Language Processing is built on top of text and string processing of some kind. It is important to know about how strings work in Python. Strings are usually easy to deal with when they are made up of English ASCII characters, but “problems” appear when we enter into…
View On WordPress
0 notes
Text
How to Create DataFrame in Python
How to Create DataFrame in Python
Python provides data structures like Series, DataFrame, Pandas. In this article, we are going to read about DataFrames.
As we know, Python also supports Data Structure. For new and beginners, let’s first discuss what Data Structure is. A data structure is basically a way of storing data in such a way that it can be easily accessed and worked with, like,
Storing data in a way so that we can…
View On WordPress
0 notes
Text
Node.js vs Python: Choosing The Right Back-End for Your Web App
Node.js vs Python: Choosing The Right Back-End for Your Web App
Node.js vs Python: Choosing The Right Back-End for Your Web App
In this article, we’ll be bold and claim that one of these technologies is winning. The question is: which one is it? Let’s jump on in and find out.
Background and overview
Node.js and Python are among the most popular technologies for back-end development. Common knowledge holds that there are no better or worse programming…
View On WordPress
0 notes