Tag: Python Data Structures

What Is The Order To Learn Python?

Years ago, when I first got into learning Python (while I was still a QA engineer) I wasn’t sure about the order in which I should learn Python. So, what is the order to learn Python? Let’s look into the most common topics and questions people ask when it comes to learning Python properly.

What Is The Order To Learn Python?

As a Python developer with 7+ years of experience, I can say that it’s important for you as a beginner to learn Python in a specific order.

Start with the basic concepts of programming, such as the following:

  • Variables
  • Data types
  • Loops
  • Control structures

These will give you a solid foundation and understanding of fundamentals. From there, you can move on to:

  • Learning the syntax of Python
  • How to write and run programs
  • How to define and call functions
  • How to work with modules.
Continue reading

What Is dict() In Python? (5 Examples)

Back when I used to work as a QA engineer and when I first got into Python (around 7 years ago), one of the key concepts I learned to use was dict() in Python. You might wonder what is dict()in Python and what are the main features of a dictionary in Python? Let’s discuss the answer to these questions in great detail below. 

What Is dict() In Python?

In Python, the dict() function is used to create a dictionary.

A dictionary is a collection of key-value pairs, where each key is associated with a value.

This function takes in a sequence of items and returns a dictionary with the items in the sequence as keys and values.

For example, you could use the dict() function to create a dictionary like this:

my_dict = dict(
    [
        ('key1', 'value1'),
        ('key2', 'value2')
    ]
)
Continue reading