On Sat, Oct 13, 2018 at 3:07 AM Kaan Taze <bkaant...@gmail.com> wrote: > > Hi everyone, > > Since this is my first post to mail-list I'm kind of hesitant to ask this > question here but as many of you spend years working with Python maybe some > of you can guide me.
Hey there, welcome! :) > I do what I need to do with Python too but I was kinda shocked > when I solve Python questions at Hackerrank. Even with list comprehensions > you can implement in very smart way to get things done and easy. > Iterations, string operations. There are many many different ways to write code, and you can approach your coding challenges from all sorts of directions. My recommendation is: Pseudo-code first, then implement in actual Python. https://en.wikipedia.org/wiki/Pseudocode Note how, in the Wiki page, there are a number of different forms of pseudocode. You're free to develop your own particular style. In general, pseudocode is a bit more rigorous than plain English, but less than actually-executable code. Once you have some pseudocode written, make as few changes as you can, getting it to be runnable. In other words, you want your final code to look as much like pseudocode as you possibly can. Python is great at this; the syntax lends itself well to that style of writing. (In fact, when I'm teaching JavaScript, I often push students towards a pseudocode style that looks a lot like Python code.) Code should express an algorithm, not showcase your ability to wield language features :) Hope that helps! ChrisA -- https://mail.python.org/mailman/listinfo/python-list