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

View all comments

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.