Overwhelmed by the Simplicity of Python. Any Recommendation?

Rob Gaddi rgaddi at highlandtechnology.invalid
Fri Oct 12 12:12:03 EDT 2018


On 10/11/2018 11:29 PM, Kaan Taze 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.
> 
> What I trouble with is not a logical error that exist on a program I wrote.
> It's the Python itself. Well, I'm 22 years old CS student -from Turkey- and
> what they showed us at university was C Language and Java but I mainly use
> C in school projects etc. So it's been few months that I started to use
> Python for my personal side-projects. There are lots of resources to learn
> language. 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. The codes I see on the Internet using basics
> in a very clever way which I couldn't come up with the same solution if I
> tried to for some time. I do understand this ways but coming from ANSI C
> makes it hard to see this flexibility. I probably do things in a both
> inefficient and hard way in my projects.
> 
> How do I get used to this? Is this just another "practice, practice,
> practice" situation? Anything you can recommend?
> 
> 
> All the best.
> 
> Kaan.
> 

A) Yes, it's practice practice practice.

B) Don't get hung up on finding the clever solution.  Comprehensions and 
generators and lots of other things are great under some circumstances 
for making the code clearer and easier to read, but they too can become 
the hammer that makes everything look like a nail.  The most important 
thing is that your code is logical, clean, and easy to understand.  If 
it doesn't take full advantage of the language features, or if the 
performance isn't optimized to within an inch of its life, well so be it.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.



More information about the Python-list mailing list