r/learnprogramming • • May 18 '17

Python for Beginners - Complete Series

A nine-part series I put together on Python Programming for Beginners. We go over the setup, data types, conditionals, loops, functions, how to import modules and explore the standard library. I hope you find them useful:

  1. Installation and Setup

  2. Strings

  3. Integers and Floats

  4. Lists, Tuples, and Sets

  5. Dictionaries

  6. Conditionals and Booleans

  7. Loops and Iterations

  8. Functions

  9. Importing Modules and the Standard Library

Entire Playlist - Here

1.7k Upvotes

72 comments sorted by

56

u/JonHMChan May 18 '17

This is awesome Corey! I've actually been looking for some more free video courses for Python. Mind if I add it to my Python tutorials list?

15

u/coreyschafer May 18 '17

Thanks... and of course, feel free to add it.

4

u/[deleted] May 19 '17

Sorry I can't watch the videos just yet, but I certainly plan to, is this for 3.5?

3

u/coreyschafer May 19 '17

These are 3.6, although there isn't much of a difference. Only small difference is that we cover f-strings, which is only available in 3.6, but that is the only difference between 3.5 and 3.6 in the series.

1

u/[deleted] May 19 '17

Okay awesome, I just got the VS update with 3.6 support so this will be great.

2

u/innitg May 21 '17

will watch later <333

1

u/BlackDave0490 May 19 '17

WTF how have i never heard of this? this is a very good resource, will bookmark

4

u/[deleted] May 19 '17 edited May 19 '17

Thank you for posting this! Summertime is here and I'm so excited to have some time to myself to pursue self interest. I will be a very good Python programmer by the time summer ends. Random question that will most likely get missed... I really love designing user interfaces in Photoshop as mock-ups, and really love software that has great aesthetics. So my question is, what else would I want to look at if I wanted to design a user interface that went along with my python script and allowed for user interaction some how?

1

u/coreyschafer May 19 '17

I'm a little biased here because I create a lot of backend Python web applications for my full-time job, but I would say that may be a good route for you. Flask is a great one to start with. It will allow you to template out a web design with HTML and CSS on the front end, and then handle the data and user input on the back end with Python. I'm sure there are more answers to a question like this, but a Flask web application is what popped into my mind while reading this. Hope that helps.

1

u/[deleted] May 19 '17

Very cool! I will most certainly pursue that route as a starting point and see how far I can go with it. I'm absolutely loving your Python series. Right now I'm working through your Object-Oriented portion, building up me a database of Employees :P. Thank for you for the information.

1

u/[deleted] May 29 '17

Flask

You should totally make a little tiny mini-series building a very basic web app built on Flask that does something very simple with a python script :D

2

u/BABYEATER1012 May 19 '17

Would you recommend this for people who have zero programming experience?

3

u/coreyschafer May 19 '17

Someone else asked this as well... and yes, Python is a great language to start with. This series starts with the installation and builds up to other concepts from scratch, so you should be able to follow along. If you have any questions or get stuck on anything then feel free to ask.

1

u/5areductase May 19 '17

I'm thinking of starting Python but are there any disadvantages to starting with Python as a beginner? (E.g. maybe it automates some stuff and makes transitions to other languages harder? I have no idea). I am currently learning C because it was recommended to start low but am a bit bored because I can't really do much with it atm.

2

u/boxa72 May 19 '17

It's a great language to learn the fundamental concepts of programming but eventually you're gonna need other languages. Personally I think Python and C are complimentary because a lot of Python is actually written in C. The interpreter is 100% C and so are a lot of Python's libraries and when you know a bit of C it gives you an appreciation of the abstraction level behind Python ie pointers and the like. They say you should know a compiled language, a scripting language and a database one and the above 2 have ā…”'s of that covered

12

u/TheHopskotchChalupa May 18 '17

That's​ a wonderful resource! Good job!

12

u/A_Light_Spark May 19 '17 edited May 19 '17

Cool!
Your explanation on dictionaries and string slicing helped me a lot.

I'd also love to see a video on trees (binary) and recursion from you because I still suck at them.

Edit: a word

3

u/ToRCSC Jun 27 '17

This was so helpful to me as well, thank you!

8

u/mertzlufft May 19 '17

Today was a good time to visit this sub

4

u/jackshafto May 18 '17

Thanks. Subscribed.

4

u/innitg May 19 '17

Thank you, I will be checking this out tomorrow.

1

u/iamrolari May 18 '17 edited May 19 '17

Would you recommend this to someone who doesn't know a thing about programming but just looking for somewhere to start?

Disregard, you literally covered this in the first 10 secs of the video. Thanks for the resource. Here's to hoping Im the next bill gates.

6

u/coreyschafer May 19 '17

Sure. Python is a great language to start with. This series starts with the installation and builds up to other concepts from scratch, so you should be able to follow along. If you have any questions or get stuck on anything then feel free to ask.

1

u/adolfo2582 May 19 '17

This is a great tutorial series, Corey. You can submit it to https://hackr.io/tutorials/learn-python to get more feedback from the Python learning community.

2

u/coreyschafer May 19 '17

Hey, thanks for the feedback. Feel free to post it there if you'd like.

1

u/BKD2674 May 19 '17

Hello Corey, and thank you for this. I have a question.

I'm setting up atom and got to the last step here: https://youtu.be/DjEuROpsvp4?t=18m44s

What would the correct path be to setup the script to run 2.7 version for windows? I'm assuming the "/usr/bin/python2.7" is a mac only path?

Thank you for the help.

1

u/coreyschafer May 19 '17

Hey there. It can be different from user to user. What I would recommend would be to run Python 2.7 in your command prompt, then run:

import sys
print(sys.executable)

It should show you the PATH to that executable. Hope that helps

1

u/BKD2674 May 19 '17

Thanks for the help, I found this:

(Personal)\AppData\Local\Programs\Python\Python36-32\python.exe

I don't see anything in that folder with a 2.7 version, am I supposed to go back to python.org and download the older version? Sorry for the noob questions.

1

u/coreyschafer May 19 '17

You may already have Python 2.7 installed but it's just not set as your default. Does any version of Python run if you type "python2.7" or "python2" into your command prompt?

Also, fyi... when you add that PATH to Sublime, you'll leave off the python.exe part.

1

u/BKD2674 May 19 '17

Ok thanks, I don't think I have 2.7 installed so I'll do that.

1

u/mntbss May 19 '17

Stupid question but my work has a website for scheduling that I can move around work days in, would python be able to alert me when a certain word is on the site or even able to highlight my schedule and automatically switch it with another one being offered?

1

u/coreyschafer May 19 '17

Hey there. Someone may be able to better answer this than me, but I would think it depends on how the website is written. Python has some excellent web scraping packages that can go out and pull down information and send you alerts. As far as interacting with the site, it can be a little trickier. You could use Selenium with Python to achieve this, but that may be more than you're wanting to learn at the moment. It would definitely be a great test project to learn and get experience though. Also, if this website requires a login or authentication then that would add another layer of complexity. It can be done, but just another hurdle to jump. Hope that helps. I would definitely recommend giving it a shot!

1

u/mntbss May 19 '17

I'll figure out what it's written with and let you know, an alert would be perfect if automatic selection is too hard. It does have a login

1

u/mntbss May 19 '17

It looks like the page extension is jsp so Java?

3

u/SavvyByNature May 19 '17

Thanks for this!

3

u/wefearchange May 19 '17

I've done other Python for beginners things and this is by far one of the best I've seen. Thank you. :)

2

u/atenorio4 May 18 '17

Cool! Thanks!!

2

u/jorgehn12 May 18 '17

This is awesome!!

2

u/ikeakunst May 18 '17

Thx for your effort!

2

u/zoreIIe May 19 '17

Awesome resource, earned a sub from me

2

u/[deleted] May 19 '17

This guy is good and his dog is cute too!

2

u/legendz411 May 19 '17

Good stuff. I love Python!

2

u/[deleted] May 19 '17

Thank you very much Corey. Added the course to my Playlist and Subscribed

2

u/policesiren7 May 19 '17

Hey Corey, been learning for a couple of months now and stumbled across your videos a while back. I haven't finished them because I've been up to my ears in assignments but you make fantastic videos. Keep up the good work.

2

u/SteveChiefy May 19 '17

Awesome! Saving for use

2

u/MozzyZ May 19 '17

I've been wanting to learn programming but always got very overwhelmed by all the different explanations (or lack there of of certain concepts) which made it very hard to stay motivated. So far I've set up sublime text to how you've got it set up and got a better understanding of what strings actually are through your second video. Thanks a lot so far!

2

u/fuckallofyouforreal May 19 '17

Thank you! I subscribed to your channel. Lots of great looking videos on there. Look forward to watching them all.

2

u/jkuhl_prog May 19 '17 edited May 19 '17

I'll definitely add this to my to-do list.

Got frustrated with C++ and I'm thinking maybe if I learn and master Python and come back to C++ later, maybe I'll have more core programming concepts in my head to tackle C++

Now, I do understand the two languages have VERY different syntaxes, and there are some features coughpointers*cough that aren't in Python. But the hope is, being a better coder through Python can in some ways help me be a better coder in C++ or any other language (Swift is on my hit list, I'd love to make an app.)

Python so far has been easier to learn.

I've also already got IDLE, but watching the install parts taught me a thing or two about Python in the Terminal

1

u/balenol May 19 '17

Decorators

Hehe

1

u/TheDrCharlie May 19 '17

I wish I knew python existed 15 years ago, I'd probably be in a programming job now.

1

u/jzorr May 19 '17

very helpful. Thank you.

1

u/Dokiace May 19 '17

I'm looking for ways to fill my holiday with productivity, this just added to my bucket list, thanks!

1

u/shhhpark May 19 '17

thanks!!

1

u/[deleted] May 19 '17

I'll add this to my weekend study list!

1

u/winsome_losesome May 19 '17

This is so awesome man! Finally I can get started with python.

1

u/ErraticFox May 19 '17

I'm quite decent at JS and Node and I really want to learn Python but I don't get the importing libs, classes (I think), and variables. It just feels so overwhelming compared to Node. Though I'd expect it to be, but everytime I try to learn Python, like when I wanted to create a simple desktop app with a UI. I was just so lost compared to me building a electron app.

1

u/unitarder May 19 '17

Commenting for later. (I never remember to check my saved links)

1

u/dogowner32 May 19 '17

Well, I know what I'm doing today :)

1

u/[deleted] May 19 '17

I love you'!! Thanks for this!

1

u/UndueAdvantage May 20 '17

Guys i'm an absolute beginner to programming and i've decided to start with python. Should i get Learn Python The hard way or Beginning Programming with python for dummies?

1

u/BIueskull May 20 '17

Thankyou so much, thanks to you I created my first project on python! Which happens to be the hello world but it got me excited regardless. But im running into an issue. I had python 3.6 installed on my computer, but when I went into cmd.exe, and typed "python --version", it stated there wasn't a program called python on my computer. Even though it was running. So I updated to python 3.6.1 and I can't find python on my computer at all. Ive never encountered this problem but maybe someone here can help?

1

u/agroom May 20 '17

Absolute perfect timing too, I was just getting ready to learn python. TYVM!

1

u/[deleted] Jun 03 '17

Hey Corey, just wanted to say thanks, and great job on these videos! I'm taking a Python/C++ class next semester, and trying to get ahead of the class. I have a question though about your variable naming convention. Is the underscore method used a lot in the industry, or do you just prefer it? Every intro book I've read before uses the camel case naming convention. Just curious as I have no real world experience, thanks again for the great videos!

0

u/[deleted] May 20 '17

[deleted]

2

u/coreyschafer May 20 '17

Oh thanks, I'll add that in.

0

u/[deleted] May 19 '17

[deleted]

2

u/you_get_CMV_delta May 19 '17

You have a legitimate point. I hadn't thought about the matter that way before.