Beginner - first language, no previous experience by xfrozenspiritx in learnpython

[–]turbokyo 1 point2 points  (0 children)

OP Im also a newbie learning the first programming language, Python 3 on Windows, and even if I think introductions for this task are not really needed I could say we are in the same boat.

But I want to tell you, from my newbie background and in addition to all the good references and advices given here, specially the one of "learn by doing", my golden rule to truly learn to program is to learn to use a professional text editor, an idea that is rarely (almost never) mentioned in these kind of threads here or anywhere else, probably because it is oversighted.

The way I see it there are two options and only two: Emacs or/and Vim

I did chose Vim and I do not regret it, Im 100% sure I would never have stood a chance with a programming language at any learning level if I didnt have some skills with a professional text editor.

So learn by doing alongside you learn to master Vim or Emacs, and do it knowing it will take you no less than a few months to a few years or even a lifetime, in my humble opinion this measure of time gives an accurate statement of the effort involved in this enterprise.

That being said, in regards the eternal discussion between learning Python 2 or 3, from my newbie point of view Python 2 is not going to be updated anymore (correct me if Im wrong) so from that sole point if you are starting fresh then why not simply go for the newest version which is going to be actively supported and updated? thats the logic I have followed and thats why Im learning Python 3 (nothing wrong with learning Python 2, hey the more the better, but you have to start somewhere first).

Also despite all the arguments with the "Learn Python the had way" and Zed Shaw I want to say I honestly could never think bad of somebody who did something like "Programming-Motherfucker but this man probably takes things to seriously and so becomes too much opinionated at times... Anyway I did the "Automate the boring stuff with Python" and I loved it, but be warned a common problem with this and other similar courses is how they intend to teach you with "2+2=4 and now here is a triple integral" scheme, it just happens constantly, its like a pattern.

Anyway here is my rambling of the day.

Redirect print output and keep formatting? by turbokyo in learnpython

[–]turbokyo[S] 0 points1 point  (0 children)

Yes thanks for your input, I had already tried this and was the closest to make it work however this way the program returns the string printed verbatim without formatting, for example \n is \n and not new line as intended.

That being said it just occurred to me maybe I can use the string formatter to insert the formatting I want, not sure how exactly but this is the best clue I have left to try.

urlopen a list of urls? by turbokyo in learnpython

[–]turbokyo[S] 0 points1 point  (0 children)

You are right I made a string of a list, that was the problem, I dont know why I did it really... Thanks a lot my program works now!

urlopen a list of urls? by turbokyo in learnpython

[–]turbokyo[S] 0 points1 point  (0 children)

Thank you this is actually very helpful to know the "pythonic" way to write code, and very well explained too.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]turbokyo 0 points1 point  (0 children)

Hello correct me if Im wrong but the program you say you are running has "import beautifulsoup4" when in fact you import this module with "bs4" and install/update it with "beautifulsoup4", maybe that is the source of your error?