DEV Community

Cover image for What is the Most Difficult Concept to deal with in Python?
detimo
detimo

Posted on

What is the Most Difficult Concept to deal with in Python?

When it comes to Python, youll find that you pick up on many of the concepts quite quickly. Yes, there will be some things here and there that may give you some trouble - you are learning a new language after all - but the similarities to the English language will make learning Python much more easy to take on than learning C or Javascript.

Overall, Python is a very simple concept to grasp. Everything is written in a manner that is clean and easy to read. Plus, youll likely grasp code that you havent ever used faster than you would in other programs because of the no-nonsense language Python was developed with. That being said, there are some frustrations that every programmer runs into when working with code. Here are a few that you may experience while working with Python.

Indentions

While indenting is usually just an annoying practice that programmers either live and die by or casually ignore, theres no getting around it with Python. Indentation is built directly into Pythons programming language, so youll have to learn quickly if you want to build anything!

Python wants four spaces for every ident:

while i < 10:
    i = i + 1
    if i == 5:
        print("5")

Indenting isnt all bad though - it makes your code more readable, easier to maintain, and much easier to debug. When you get the hang of it, it will start to feel like second nature. Plus, there is an added silver lining. Many of the syntax issues that come with other languages wont carry over to Python because you wont have to worry about brackets, colons, semicolons, and the like.

spacebar

Documentation

This complaint is pretty much universal for coders of every programming language - documentation can be a pain to sort through. This is especially true if your source prefers to upload raw docs instead of making a more user-friendly version. Yikes!

That being said, Pythons documentation tends to be miles ahead of other languages in terms of readability. It may take you a while to get the hang of it, but youll gradually start intuitively understanding the content as you become more experienced.

Be sure to look for any examples that may be given farther into the documentation and try to learn by applying the syntax written in the example. When youve figured out how to use the example in the doc properly, go back and read the first section. Things will be much more clear!

There's also a lot of examples when you search the web, which are sometimes more in-depth or broad than the official docs. Don't forget stackoverflow.

Writing Programs

When it comes down to it, the hardest part of any language is just figuring out how you want to apply what you've learned. Walking through tutorials and reading informative articles will be the easy part - the real challenge comes from creating an idea and seeing it through to fruition.

That being said, there is a way you can combat this issue. The answer is simple - start by creating a journal that you can use to log all the ideas you have for different programs and apps. When you do this, be sure to add some notes about different ways to build the structure of the program - this will be very helpful later on.

Resources

Top comments (1)

Collapse
 
iceorfiresite profile image
Ice or Fire

I think list comprehensions can be confusing to grasp