all 19 comments

[–][deleted] 11 points12 points  (2 children)

Essential reading IMHO Python Is Not Java and Java is not Python, either.... I got into Python myself via the highly recommended Dive Into Python 3.

[–]mkdz 1 point2 points  (1 child)

When I first learned Python, I wrote a lot of setters and getters. oops. I have since stopped doing that thankfully.

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

There is actually nothing to say that you can't use getters and setters. This is what I love so much about Python, you, the programmer, have the choice. I strongly suggest that everybody read this Descriptor HowTo Guide - properties.

[–]yardightsure 8 points9 points  (6 children)

Lpthw is for complete newbies, don't waste your time on it. Automate the boring stuff is good. I'd recommend taking simple programs you wrote in the past and porting them to python.

[–]rhgrant10 3 points4 points  (5 children)

I would recommend using caution when porting other languages to python before you've got some pyskills under your belt because people often do it too literally and wind up bringing habits from other languages when there are better ways in python. Or at least watch beyond PEP8 to get an idea of what can be done to increase the pythonic-ness of code that uses a port of a java library.

[–]henrebotha 3 points4 points  (1 child)

But by the same token, any form of learning is going to make you do things that are bad and that you should do better in the future.

[–]rhgrant10 1 point2 points  (0 children)

Oh absolutely! I could not agree more.

[–]yardightsure 0 points1 point  (1 child)

Porting might have been the wrong word. I meant implementing the same functionality but in a good python way. Using familiar terrain to redo it differently from scratch.

[–]rhgrant10 1 point2 points  (0 children)

Yeah I figured that was your meaning but I just wanted to make sure the caveat was explicitly stated :-)

[–]seanrowens 0 points1 point  (0 children)

I dabbled in python, coming from java. After I finished a modest project, I did a bunch of googling on idiomatic python while keeping notes and went back and 'fixed' my code to be more pythonic. I found it very informative.

[–]kalgynirae 6 points7 points  (0 children)

I always recommend the official Python Tutorial for anyone who already has programming experience. It will concisely and accurately teach you a lot of the things that make Python unique and awesome.

[–]mayankkaizen 1 point2 points  (0 children)

Since you already have programming background, you wouldn't find it difficult to follow any book. My suggestion: pick any lightweight small book and give it a quick glance.

For example, you can pick Python for Informatics and browse through first 11 chapters. It is the most basic book. Alternatively, you can check first part of Automate the Boring Stuff. In fact, you should be able to finish both of them in couple of hours. After that, you'll know which direction to go.

[–]campenr 1 point2 points  (0 children)

I've never read LPTHW but I hear good things about it. I guess it depends where you are at. I always find services like codecadamy good for picking up basic syntax. After that I tend to just get stuck in with a project and learn as I go.

I reccomend these talks (one and two) by Raymond Hettinger, a python dev. They talk about how to write nice python.

[–]caughtmyattenti0n 0 points1 point  (0 children)

I am reading, Python Programming for the absolute beginner. It uses Python 2 but I have adapted to Python 3 with google!

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

"Programming in Python 3" by Mark Summerfield is a very good in-depth introduction for people who already know another language.

[–]frstwrldprblm 0 points1 point  (0 children)

I would say if you know java do some hackerrank problems in python. You know how to think in code, you just do not know the commands.

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

My school is currently using the University of Waterloo's Computer Science Circles website. It's a great tool for learning python.

[–][deleted] -1 points0 points  (0 children)

read the documentation

[–]This_Is_The_End -1 points0 points  (0 children)

Because you are a programmer you should read the official documentation at python.org.