DEV Community

loading...

My First Month Learning Python

piniolk profile image Katherine Piniol ・2 min read

Using a Udemy Course, The Modern Python 3 Bootcamp by Colt Steele, I started to learn Python in my free time. Python is not my first programming language, I have some previous experience with Java, C, C++, and JavaScript. Through college courses, I learned the previously stated programming languages, while also learning about some foundational topics.

My first impression of Python was that it was noticeably different from both Java and C.

The syntax was not something I was used to. While I'm used to coding standards – keeping everything organized and easy to read – Python requires you to keep track of tabs in place of the usual semi-colons like in other languages.

With things like for-loops and while-loops, in Java and C, the curly brackets is the one the holds everything in place. Instead, in Python, a colon introduces you to its contents. Here's an example of what I mean.

Java

int sum = 0;
for(int i = 0; i < 10; i++) {
    sum += i;
}

Python

for i in range(10):
    sum += i

Even with a few lines of code, there are a lot of differences.

The way variables are defined are also different. In Java and C, you have to explicitly state what kind of variable it is, unlike Python, where it's more like JavaScript., the type of variable isn't explicitly stated and can change depending on how you set its value.

There's also list and dictionary comprehensions, something Java doesn't have. It's another way to iterate through lists or dictionaries.

So far, while different from what I am used to, Python is something that I am able to quickly get used to.

The Udemy course that I follow goes into depth, giving exercises about each new topic it introduces. After following the course through completion, I plan to take another course about AI in Python, to supplement the college course and independent research I have already done.

Discussion

pic
Editor guide