Python Beginner Thread

by spasm

spasm
Junior Member
Kohai
Posts: 18
Threads: 2
Joined: Jan 2016
Reputation: 0
01-21-2016, 11:47 AM
#35487 (1)
So i started learning Python, and would love some more resources, suggestions. I'm a complete newtard when it comes to programming, so any suggestion would be awesome! I can post some Python pdfs if someone needs them.

[Image: 687474703a2f2f646174612e77686963646e2e63...652e676966]
tsundere
meme empress
lainchan
Posts: 76
Threads: 6
Joined: Jan 2016
Reputation: 1
01-21-2016, 12:28 PM
#35493 (2)
i'm also just learning to program. the way i learned was by doing some of the codecademy course on python and then applying that to various ideas i've had. i don't know if you play the elder scrolls, but one of my early projects was a python script that generates a character build for morrowind. you might want to try something similar, if you play games.

[+] 1 user loves tsundere's post
spasm
Junior Member
Kohai
Posts: 18
Threads: 2
Joined: Jan 2016
Reputation: 0
01-21-2016, 12:43 PM
#35494 (3)
(01-21-2016, 12:28 PM)kawaiidesuka Wrote: i'm also just learning to program. the way i learned was by doing some of the codecademy course on python and then applying that to various ideas i've had. i don't know if you play the elder scrolls, but one of my early projects was a python script that generates a character build for morrowind. you might want to try something similar, if you play games.

Automating stuff, that's a good way to learn. I kinda stopped playing vidiya, so yea, good suggestion but i can't go back. : o

[Image: 687474703a2f2f646174612e77686963646e2e63...652e676966]
Yuu
ℳℴℯ❤ ( ´・‿-) ~ ♥
lainchan
Posts: 368
Threads: 8
Joined: Aug 2014
Reputation: 9
01-21-2016, 01:08 PM
#35496 (4)
Despite that I mostly feel confident in C++ and also learing Java I think I can say that Python is my favorite language. First real "programming" language (Scripting language if you want to use the correct term) I learned was Python. It's been a while since I did anything with it. I think I need to brush up my skills as well.

If you like reading ebooks, have my Python ebook collection :) I have other ebooks too if anyone wants.
https://mega.nz/#!Alp3WDxY!94Q58TvYlrkSz...FvQaDMzhx0 [89 files ~ 475]

Also here's some useful resources for learning python:
Great documentation: https://docs.python.org/
Tutorial hub: http://www.tutorialspoint.com/
If you prefer video, check this guy out: https://www.youtube.com/user/derekbanas/featured (Check out his videos)
[+] 1 user loves Yuu's post
malmon
nya?
Torrents
Posts: 1,080
Threads: 18
Joined: Nov 2015
Reputation: 12
01-21-2016, 02:12 PM (This post was last modified: 01-21-2016, 02:14 PM by malmon.)
#35498 (5)
Good choice! Python is currently my favourite language (currently learning C and System Verilog). I wouldn't know of much in terms of learning resources, though, as I learnt the basics in school, and picked up the rest mostly from StackOverflow or whatever came up from a Google query.

While the Python docs are quite good, I think they can be a bit difficult for a complete novice to understand.

Good luck! Give us a shout if you need help :)
[+] 1 user loves malmon's post
tftp
caffeine
Optimist
Posts: 302
Threads: 4
Joined: Sep 2015
Reputation: 2
01-21-2016, 02:29 PM (This post was last modified: 01-21-2016, 02:32 PM by tftp.)
#35499 (6)
http://learnpythonthehardway.org/book/ is a great introduction, but the best way to learn programming is to program, not just use examples out of a book. Try small projects here and there any you eventually start to build up to large scale projects.
[+] 3 users love tftp's post
rod
...
lainchan
Posts: 59
Threads: 1
Joined: Nov 2015
Reputation: 0
01-21-2016, 03:08 PM
#35504 (7)
http://programming-motherfucker.com/become.html#Python

I highly recommend Think Python, by Allen Downey.
[+] 2 users love rod's post
malmon
nya?
Torrents
Posts: 1,080
Threads: 18
Joined: Nov 2015
Reputation: 12
01-21-2016, 08:40 PM
#35521 (8)
Also make sure to use the correct version of Python, depending on what resource you're learning from, as there are some differences that may cause some slight problems.

For example, in Python 2.7, a print statement can look like
Code:
print "Hello, world"
or
Code:
print("Hello, world!")

Whereas in python 3.4, only the latter is valid, as the former would raise a SyntaxError.

A pretty basic example, but I imagine it's one that might trip up a complete beginner.
[+] 1 user loves malmon's post
spasm
Junior Member
Kohai
Posts: 18
Threads: 2
Joined: Jan 2016
Reputation: 0
01-21-2016, 08:47 PM (This post was last modified: 01-21-2016, 08:47 PM by spasm.)
#35523 (9)
(01-21-2016, 01:08 PM)Yuu Wrote: Despite that I mostly feel confident in C++ and also learing Java I think I can say that Python is my favorite language. First real "programming" language (Scripting language if you want to use the correct term) I learned was Python. It's been a while since I did anything with it. I think I need to brush up my skills as well.

If you like reading ebooks, have my Python ebook collection :) I have other ebooks too if anyone wants.
https://mega.nz/#!Alp3WDxY!94Q58TvYlrkSz...FvQaDMzhx0 [89 files ~ 475]

Also here's some useful resources for learning python:
Great documentation: https://docs.python.org/
Tutorial hub: http://www.tutorialspoint.com/
If you prefer video, check this guy out: https://www.youtube.com/user/derekbanas/featured (Check out his videos)

Hey thx for the replay! I'll gladly use the resources u shared. :D

Wow, much feedback, tnx people. : D

[Image: 687474703a2f2f646174612e77686963646e2e63...652e676966]
Equinox
Former Lewd.SX Owner
#F8365B
Posts: 483
Threads: 48
Joined: Jul 2014
Reputation: 8
01-21-2016, 09:39 PM (This post was last modified: 01-21-2016, 09:41 PM by Equinox.)
#35526 (10)
While everyone is out sending books and videos, I can recommend to you that playing around with bare basic knowledge of a language can make you unnewtard. Did it when I started programming. Look at me now, I'm a failure at life I program daily, with ease.


"The entire internet is located here, on a single CD-ROM!"
Part of the glorious Linux master race.

[Image: 687474703a2f2f7075752e73682f69534f65312f...362e706e67]
[Image: 68747470733a2f2f692e696d6775722e636f6d2f...412e6a7067]
[+] 2 users love Equinox's post
Red
Vampire hunter/metaphysician
Music
Posts: 59
Threads: 1
Joined: Sep 2015
Reputation: 2
01-27-2016, 12:46 AM
#35876 (11)
I recommend the python reference.
https://docs.python.org/3.5/reference/index.html
[+] 1 user loves Red's post
Kanchō
>Implying I can code
Kohai
Posts: 3
Threads: 1
Joined: Jan 2016
Reputation: 0
01-30-2016, 11:46 AM (This post was last modified: 01-30-2016, 11:47 AM by Kanchō.)
#36008 (12)
Seconding Learn Python the Hard Way. Though I went through it knowing C beforehand, so it felt redundant for the most part, the lessons being aimed at people with no idea of general programming concepts. That, and the autor's attempt at humor felt cringeworthy. Still, if it's the first language you learn, it's a good book.
Viomi
Sinner
Kohai
Posts: 41
Threads: 2
Joined: Feb 2016
Reputation: 0
02-03-2016, 03:03 AM (This post was last modified: 02-03-2016, 03:05 AM by Viomi.)
#36161 (13)
I can't handle python.

As someone who has worked with a shitton of different scripting and programming languages over the years, it is probably my second least favorite. This is because I use sublimetext and I like my brackets for sorting. Having a language literally read by indentation is just... So horrid to me. I don't understand how people manage to start programming with python. lua is straightforward and easy, everything is as you'd expect it to be. I like being able to see where my code blocks end.

//rantover

In all seriousness though it can be useful and it is a powerful language. Just don't expect me to be using it unless I absolutely have to. Enjoy learning! The only place I don't recommend learning programming is in a classroom setting. (Three months for the basics of a language even though the basics are pretty much the same throughout most languages?? wtf)

Oh and check out http://devdocs.io/ and https://repl.it/languages

Public Key & Bitcoin
Tox: B540063A92D12D13788EBBD72F5574422F311FBCC7112B74154491762C000354C8BF60024BC5
[Image: 687474703a2f2f692e696d6775722e636f6d2f48...652e706e67]






[+] 2 users love Viomi's post
malmon
nya?
Torrents
Posts: 1,080
Threads: 18
Joined: Nov 2015
Reputation: 12
02-03-2016, 09:50 AM (This post was last modified: 02-03-2016, 12:50 PM by malmon.)
#36174 (14)
>>36161
> This is because I use sublimetext and I like my brackets for sorting. Having a language literally read by indentation is just... So horrid to me.

Do you not indent your bracketed blocks?
Viomi
Sinner
Kohai
Posts: 41
Threads: 2
Joined: Feb 2016
Reputation: 0
02-03-2016, 10:56 PM
#36206 (15)
(02-03-2016, 09:50 AM)malmon73 Wrote: >>36161
> This is because I use sublimetext and I like my brackets for sorting. Having a language literally read by indentation is just... So horrid to me.

Do you not indent your bracketed blocks?

Of course I do.

But there are times when a bracketed block doesn't need to be indented and in fact is simpler and easier to read non-indented. I don't like being limited or forced to do  something like indentation.

Sometimes I like to indent certain lines differently in a block of code for the sake of easy reading and the like.

Public Key & Bitcoin
Tox: B540063A92D12D13788EBBD72F5574422F311FBCC7112B74154491762C000354C8BF60024BC5
[Image: 687474703a2f2f692e696d6775722e636f6d2f48...652e706e67]






[+] 1 user loves Viomi's post
maid.mona
NEET
NEET
Posts: 35
Threads: 6
Joined: Feb 2016
Reputation: 2
02-04-2016, 12:44 PM
#36221 (16)
I've had trouble with python identation stuff.. it's similar to a thing that bugs me in Go (new google language):
You're not allowed to have any unused variables in your code or the compiler rejects it as an error. That's fine for a final product but what if I'm doing development? It just causes me extra work and gets in the way of programming, I would prefer it to be a warning. On the other hand, bad indentation can't just be a warning in python.
It's not that big a deal but it can be a little frustrating to me sometimes, for example I copy a snippet of code and want to try it out but I have to spend a bunch of effort fixing up the indentation before I can see that it's the wrong thing and delete it..
RX14
Chibi Hentai Master
Optimist
Posts: 494
Threads: 5
Joined: Nov 2015
Reputation: 1
02-04-2016, 05:52 PM
#36250 (17)
>>36221
> I've had trouble with python identation stuff.. it's similar to a thing that bugs
> me in Go (new google language):
> You're not allowed to have any unused variables in your code or the compiler rejects
> it as an error. That's fine for a final product but what if I'm doing development?
> It just causes me extra work and gets in the way of programming, I would prefer
> it to be a warning. On the other hand, bad indentation can't just be a warning in
> python.
> It's not that big a deal but it can be a little frustrating to me sometimes, for
> example I copy a snippet of code and want to try it out but I have to spend a bunch
> of effort fixing up the indentation before I can see that it's the wrong thing and
> delete it..

Well, with an unused variable you should be able to just comment it out, but I agree it should be a warning. But I like how it forces you to indent propery. Indentation isn't hard, and it's neccesary for readable code. Reformatting code is usually 1 keyboard shortcut in a good IDE, and some reformat code as you paste it in. Enforcing that is a good thing.

[Image: 68747470733a2f2f6177772e6d6f652f683731666e372e706e67]
English animemester
[+] 1 user loves RX14's post
tftp
caffeine
Optimist
Posts: 302
Threads: 4
Joined: Sep 2015
Reputation: 2
02-04-2016, 11:02 PM
#36268 (18)
I don't write in too much python but I had to pick it up for a project and what I found pretty useful was indentation guides in my text editor 
[Image: 68747470733a2f2f752e706f6d662e69732f6a6d...682e706e67]

Most modern editors/ides should have that 

Also please don't bully my fizzbuzz, i'm sure there is a more pythonic way to do it
malmon
nya?
Torrents
Posts: 1,080
Threads: 18
Joined: Nov 2015
Reputation: 12
02-05-2016, 05:13 PM
#36330 (19)
>>36268
>  Also please don't bully my fizzbuzz, i'm sure there is a more pythonic way to do it

Your's looks alright! I don't really think there's much to pythonise.
You could do it like this, but I think your way of explicitly stating == 0 is clearer.

[Image: 687474703a2f2f6d6163696f7a6f2e636f6d2f73...352e706e67]
Red
Vampire hunter/metaphysician
Music
Posts: 59
Threads: 1
Joined: Sep 2015
Reputation: 2
02-13-2016, 11:12 AM
#36652 (20)
>>36268
[Image: 68747470733a2f2f612e706f6d662e6361742f68...732e706e67]

Or in C:
[Image: 68747470733a2f2f612e706f6d662e6361742f6f...692e706e67]

Domine, quo vadis?
pepsisan
Loli Butt Enthusiast
Loli
Posts: 24
Threads: 1
Joined: Feb 2016
Reputation: 0
02-13-2016, 01:35 PM
#36657 (21)
Here's my recomendation:
Do the Learnpythonthehard way book. Buy it if you like, or just torrent it. Complete the whole thing. Should take a week or less. Once that is done, you should have a basic knowledge of the building blocks of python. From here you can move into taking small python projects apart to see how they work (use google and git sites to find cool python projects). Play aroudn with the source code and see what shit does. Use the pydocs and stackexchange for refrence if you don't know what something does or how it works.

Basically practice practice practice. If you think you can, go on /g/ and look for the daily programming excersices threads. Do those everyday.