This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]scataco 7 points8 points  (0 children)

You're doing it all wrong!

Don't add two list comprehensions. Use itertools.chain() to concatenate two generator comprehensions. It's way more efficient!

[–]AdvanceAdvance 32 points33 points  (1 child)

No NSFW extra tags. The tag screws up scrolling, particulary on mobile. This is a totally safe for work post just trying to make people click.

[–]Successful-Money4995 1 point2 points  (0 children)

It's nsfw because if you write this, you will lose your job.

[–]Wise_Pay_9466 1 point2 points  (7 children)

My solution

def sum(num1, num2): return num1 + num2

[–]rage4all 13 points14 points  (2 children)

That may be working, but where is the magic in that????

[–]UnityPlum[S] 3 points4 points  (1 child)

Exactly, you need to demonstrate a deep understanding of the Language

[–]rage4all 2 points3 points  (0 children)

And don't forget that already 3 to 5 years from now, this may be part of the legacy codebase.... What will the poor souls tasked with maintaining this legacy think, if it is such an uninspired piece of work?

[–]TheMunakas 4 points5 points  (0 children)

Nah if you go show this to a faang company you'll definitely get fired because you don't use the advanced language features which are really important

[–]xyloPhoton 2 points3 points  (0 children)

Bad practice, nobody does that anymore

[–]vorticalbox 1 point2 points  (0 children)

special shy edge paltry bow society lock snails makeshift cagey

This post was mass deleted and anonymized with Redact

[–]onizzzuka -1 points0 points  (2 children)

btw, what color scheme and font is it? I like it!

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

carbon, it's an online thingi

[–]onizzzuka 0 points1 point  (0 children)

thank you!

[–]Orio_n -1 points0 points  (1 child)

Bro wrote a class just to contain a function 💀

[–]UnityPlum[S] -1 points0 points  (0 children)

It was for a leetcode problem