With easy-to-understand examples for beginners

Photo by Steve Johnson on Unsplash

When developing your application, you may need to overcome some tasks involving counting the elements in a container object. You may need to count word frequencies in a text or you may want to know the most frequently used number in a list object. For such cases, Python provides a handy tool in its collections module, a built-in class called Counter().

In this short article, I will try to explain how to use Counter class with easy to understand examples for beginners.

Counter Class In Python

You can find below the explanation of the Counter class at docs.python.org

A Counter is a dict subclass…


With easy to follow examples for beginners

Photo by Bench Accounting on Unsplash

Python comes with many specialised data types. In this article, I will try to explain NamedTuples by providing easy-to-follow examples for the beginners.

What is ‘NamedTuple’ Data Type?

NamedTuple is basically an extension of the Python built-in tuple data type. Here is how doc.python.org defines the NamedTuples;

Named tuples assign meaning to each position in a tuple and allow for more readable, self-documenting code. They can be used wherever regular tuples are used, and they add the ability to access fields by name instead of position index


With easy to follow examples for beginners

Photo by Levi Jones on Unsplash

There are many built-in data types in Python. Each data type has downsides and advantages depending on the use case. So, knowing the strengths and weaknesses of each data type is key to develop efficient applications.

In this article, I will try to explain deque data types in Python.

What is a Deque and What They are Designed For?

Deque is short for the double-ended queue which means that it efficiently supports adding and removing items from both ends. They are designed to perform these specific tasks efficiently.

Deques are not so different than the lists, stacks and queues.


With easy to understand examples for beginners!

Photo by Lala Azizli on Unsplash

Lists and dictionaries are the most widely used built-in data types in Python. This makes them also the best-known data types in Python. When it comes to tuples, grasping the details of how they differ from the lists is not an easy task for the beginners as they are very similar to each other.

In this article, I will explain key differences by providing examples for various use cases to better explain when to use tuples over lists.

Tuples and Lists: Key differences

  • They are both used to store collection of data
  • They are both heterogeneous data types means that you can store any kind…


Lambda functions in Python with practical examples

Photo by Clint Patterson on Unsplash

If you’ve heard of lambda functions in Python but not sure about how to use them, you’re in the right place.

This article will provide all you need to know about the lambda functions in Python:

  • What are lambda functions in Python, how they differ from the normal functions?
  • Why lambda functions are useful and when to use them?
  • Practical examples and real usage of lambda functions in Python

What are lambda functions in Python, how they differ from the conventional functions?

Lambda functions are defined without a name so they are also called anonymous or nameless functions. …


Generate 2000 questions in 5 minutes

Photo by Erdem Isbilen — lingomoo demo web app

If you aim to develop an e-learning platform, the first difficulty you have to overcome will probably be creating the course content. Unfortunately, creating course content is the most challenging part of the development process as it consumes a lot of time and energy. Fortunately, this process can be automated with the help of web scraping and natural language processing.

In this post, I will show you step by step how such automation can be achieved using spaCy.


Not only money, more than money!

Photo by Austin Distel on Unsplash

I will start with a fundamental question.

Why did I start writing on Medium, in my early forties with no writing experience at all?

I would like to say the reason is to share my knowledge to help others. But I will be honest about this, let me list what really motivates me to write;

  • I want to produce digital content that people value and care about.
  • I want my voice to be heard. I always envy the influencers in the digital world and how they affect their audience with their actions.
  • I want…


Use Python Lists Like a Pro

Photo by Corinne Kutz on Unsplash

In this article, I will try to explain Python lists, along with exploring why and when to use them, meanwhile giving you some hints about the correct usage of the list methods.

Let’s understand the Python list data structure in detail with step by step explanations and examples.

What are Lists in Python?

Lists are one of the most frequently used built-in data structures in Python. You can create a list by placing all the items inside square brackets[ ], separated by commas. Lists can contain any type of object and this makes them very useful and versatile.

Fundamental characteristics of Python lists are as…


With easy to understand examples in 5 Minutes!

Photo by Joshua Aragon on Unsplash

Generators are special functions that return a lazy iterator which we can iterate over to handle one unit of data at a time. As lazy iterators do not store the whole content of data in the memory, they are commonly used to work with data streams and large datasets.

Generators in Python are very similar to normal functions with some characteristic differences listed below;

  • Generator functions have yield expression, instead of return used in normal functions.
  • Both yield and return statements return a value from a function. …


Use Python Dictionaries Like a Pro

Photo by freestocks on Unsplash

Python programming language is widely used by developers in data science projects. To complete such projects, understanding data structures plays an important role. Python has several built-in data structures such as lists, sets, tuples, and dictionaries, in order to support the developers with ready to use data structures.

In this article, I will try to explain why and when to use Python dictionaries, meanwhile giving you some hints about the correct usage of the dictionary methods.

Let’s understand the Python dictionaries in detail with step-by-step explanations and examples.

What is a Python Dictionary?

In a nutshell, a dictionary can be defined as a collection of…

Erdem Isbilen

Machine Learning and Data Science Enthusiasts, Automotive Engineer, Mechanical Engineer, https://www.linkedin.com/in/erdem-isbilen/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store