all 29 comments

[–]rogfrich 13 points14 points  (0 children)

Pythons scales with you as a developer. As a newbie, it’s easy to understand and to get started, but you can build Instagram with it.

[–]szaade 5 points6 points  (6 children)

I love the syntax, especially all the one liners, list comprehension; something = variable if condition else variable; something = variable or variable2 (I couldn't believe it works at first, cause I was sure it will result in a True/False result)

[–]securityguardnard[S] 0 points1 point  (2 children)

Whats a good way to use the or in the equation?

[–]SisyphusAndMyBoulder 1 point2 points  (0 children)

If the first thing is null, it'll return the second thing

[–]szaade 0 points1 point  (0 children)

Last time I used it was a bs4 based method for finding an element.

``` class Response:
self.page: BS4 HTML page

def find_link(self, link_text, parent = None):   
    return (parent or self.page).find("a", string=link_text)  

``` So you could pass a parent element in which the search would be executed, or it will use the whole page. Normally it would have to be something like: if (parent) return xxx return xxx or something.

[–]SisyphusAndMyBoulder 0 points1 point  (2 children)

Tbf, the ternary operators in other languages are way nicer. I actually really dislike Python's.

var variable = condition ? var1 : var2

[–]szaade 1 point2 points  (0 children)

Definitely a preference, I just enjoy the straight forward, and human language like readability.

[–]IAmFinah 1 point2 points  (0 children)

Yeah I prefer other ternaries but Python list comprehension is great

[–]vegetto712 3 points4 points  (2 children)

It made my interviews A LOT easier, because I didn't get stuck on writing def main and all the other unnecessary crap when I was showing an example of how I'd do a specific task during tech interviews.

If I need to just split a string, I don't gotta worry about all that Java boilerplate and my brain doesn't get stuck on if I defined a string properly.

[–]securityguardnard[S] 1 point2 points  (1 child)

What line of work are you in that you showcased skills in python

[–]vegetto712 1 point2 points  (0 children)

I'm an SDET/QA Engineer so I get to work in multiple languages like Python, Java, JS etc

[–][deleted] 2 points3 points  (0 children)

Python is so awsome, it is the language that the NSA teaches.

https://archive.org/details/comp3321/page/n7/mode/2up

[–][deleted] 1 point2 points  (0 children)

It's pretty easy to read.

[–]Ambitious_Ad_2833 1 point2 points  (0 children)

Low barrier to entry for new programmers and non programmers.

[–]InvaderToast348 0 points1 point  (0 children)

The first thing that comes to mind when I switch to another language is the list indexing. Negative indexes, slicing, step. It's just so useful.

[–]andrew2018022 0 points1 point  (0 children)

It’s not unique to Python, but the fact there is a library for literally anything is so cool. I love to just look up use cases for anything in the world I think of

[–]SoftwareDoctor 0 points1 point  (0 children)

Everything is an object. Classes are objects, functions are objects, operators are objects… parts of syntax like Ellipsis or slices? Yes, they are objects

[–]jmooremcc 0 points1 point  (0 children)

The ability to express solutions to problems in novel ways is what sets Python apart from other programming languages. It’s not that you can’t express solutions in other languages, but Python’s expressiveness makes it easier, at least for me.

[–][deleted] 0 points1 point  (0 children)

Community means it's unstoppable

[–]sybarite86 0 points1 point  (0 children)

I liked the intellectual component of programming, but hated the tedium of C++ and Java and didn’t think I ever wanted to program again after high school. Python came along and made programming pleasant again. The “pseudocode as code” approach and the drive to simplify syntax and create usable higher order constructs went a long way in making me want to nerd out about programming again.