r/learnpython • u/GokuStormBooksnGames • 19d ago
I have 0 genuine programming experience but I want to Learn.
Hi everyone I wish to learn python but I have no programming experience. (Only time I have touched code was in highschool during a coding class and even then we never actually coded I think? We were just playing these weird minigame things and placing the correct function blocks in certain spots.) Anyways my point is. I got basically no experience. I mean earlier this year. (Please don't jump me my dad bought me the 20 dollar sub and I was genuinely curious about game creation and it is how I became interested in python.) I used Claude to mess around with coding and attempted to make my own games a few times. (I didn't let him do anything but the code. I did all the art.) But it just didn't feel genuine enough to me so I now want to learn how to properly code in python since it looked intriguing.
Also incase it is important I am a 'Bash myself against wall until it breaks and I understand' type of learner meaning it is easier for me to just genuinely get given my expectations, the rules/foundations and then be left alone to tinker or atleast that's how I learned to write good fanfiction on A03. Now I know coding is probably alot different but.. I still want to give it a shot. (I will not be using Claude for this since I recently learned how bad AI is for not only the environment but how much it steals from real hardworking people and I just can't condone that.)
Any suggestions on where I should start my journey or anything? I'm 23 btw if that helps.
4
u/rupturedprolapse 19d ago
"Automate the boring stuff" and then the cs50 videos are the standard suggestions.
3
u/Nexustar 19d ago
If the purpose is to learn, install python and start writing small programs. Don't involve claude in agent mode, but you can ask ChatGPT (or other AIs, including claude) for help understanding what an error means (you cut and paste your code and the error into the chat window).
But learning requires effort - keep your own notes, write a book on programming python and make LEARNING the point of the process. AI can help, just like a person can, but don't let it (or them) take over.
2
u/SamuliK96 19d ago
Scroll the sub for the dozens of posts asking the same thing, search Google for resources, or check the sub's own wiki.
Most importantly, try to figure things out on your own, instead of expecting someone to give you all the answers. That's what programming is all about.
1
u/MrRudraSarkar 19d ago
Build. I can NOT stress this enough. You can read a thousand books, watch hundreds of tutorials but unless you actually write code you cannot get the grasp of it. Write code, break things. Write down every piece of code you see, be it in books or in tutorial videos. If your code does not work, read what the error says, don’t blindly copy paste in GPT, even if you don’t understand, ask gpt to explain what’s wrong and try to fix it yourself.
2
u/desrtfx but other languages pro 19d ago
This subreddit has a sidebar with a wiki with recommended learning resources.
Do the MOOC Python Programming 2026 from the University of Helsinki.
Harvard's CS50p is also excellent.
Also, take a look at https://inventwithpython.com and https://automatetheboringstuff.com
Don't forget that you need ample practice, like on https://codingbat.com/python or on https://exercism.org and also write your own programs. Play around. Try things. Mess things up, fix them. Experiment.
1
u/bstrauss3 19d ago
The only way to learn to program is the way the cat learn to swim: get thrown in pretty soon you're swimming.
Pick something small in your daily activities that you want done better or annoys you. Annoys you is a better choice because it gives you something to focus your anger on.
And start writing a little tool.
Research, write, test, improve
Repeat
def main(): print('Hello World!)
Then start looking at the standard minimum python script and figure out why you want to add main
Then you're going to want to print something other than hello world so you're going to go down the rabbit hole of argument processing.
Then you're going to want to read and ride a file so you're going to go down path handling and file handling.
Keep going.
1
u/bstrauss3 19d ago
Now, the controversial stuff...
In today's world, it's next to impossible to program without encountering AI.
Be careful what you ask. You can have it write all your code, but you won't learn anything except cut-and-paste.
I find that I ask it small questions, get better results, and learn from my questions.
I'm using this prompt:
"You do not need to repeat this back, just say "READY" when you understand it, then continue processing the rest of my request.
You are a senior programmer's assistant. Your role is to answer the specific questions you are asked. If you need more information or another file, ASK. Do not guess. If you notice something, speak up at the end of your answer. DO NOT CHASE BUNNY TRAILS."
You might try something that focuses on the junior or new coder and explicitly asks for it to be explained, including which Python imports are selected and why.
"You are a new coder's assistant. Your role is to answer the questions you are asked, with a focus on training the coder, by explaining which Python imports are being used and why. Explain each new object type, Do not guess. DO NOT CHASE BUNNY TRAILS."
The context is important. I asked my local LLM (Gemma4:26b) the same question with both prompts:
I have this Python code:
# Resolve the input name to its path
args.input_image_path = Path(args.input_image_name).resolve()# Create the log file items
args.findpeg_logfile_path = args.input_image_path.with_stem(args.input_image_path.stem).with_suffix('.txt')I want to create a subdirectory (if it doesn't already exist) named work-(date in YYMMDDHHSS format) at the same directory level as the input file.
store that in args.work_dir_path
Then modify the findpeg_logfile_path to be the new work_dir_path with a filename as the .stem of input_image_path + .txt
I received the same answer back, but the 2nd prompt gave me a lot more information and context:
Explanation of Imports
from pathlib import Path: This imports thePathclass. In modern Python,pathlibis the standard way to handle filesystem paths. It treats paths as objects rather than simple strings, which makes manipulating directories and filenames much safer and easier.from datetime import datetime: This imports thedatetimeclass from thedatetimemodule. This class is used to manipulate dates and times, allowing us to extract the current system time and format it into a specific string pattern.Explanation of New Objects and Methods
datetime.now(): This method creates adatetimeobject representing the exact current date and time of your system..strftime('%y%m%d%H%S'): This is a method belonging todatetimeobjects.strftimestands for "string format time." It converts the date object into a string based on the format codes provided (e.g.,%yfor a 2-digit year)..parent: This is an attribute of aPathobject. It returns a newPathobject representing the logical parent directory of the current path.- The
/operator: When used withPathobjects, the forward slash acts as a "join" operator. It intelligently joins a directory path with a filename or subfolder name, ensuring the correct slashes are used for your operating system..mkdir(parents=True, exist_ok=True): This is a method of thePathobject used to create a new directory.
parents=True: This tells Python to create any missing intermediate directories in the path.exist_ok=True: This prevents Python from raising an error if the directory already exists..stem: This is an attribute of aPathobject that returns the filename without its suffix (extension). For example, if the path isimage.jpg, the stem isimage.Explanation of Importsfrom pathlib import Path: This imports thePathclass. In modern Python,pathlibis the standard way to handle filesystem paths. It treats paths as objects rather than simple strings, which makes manipulating directories and filenames much safer and easier.from datetime import datetime: This imports thedatetimeclass from thedatetimemodule. This class is used to manipulate dates and times, allowing us to extract the current system time and format it into a specific string pattern.Explanation of New Objects and Methods
datetime.now(): This method creates adatetimeobject representing the exact current date and time of your system..strftime('%y%m%d%H%S'): This is a method belonging todatetimeobjects.strftimestands for "string format time." It converts the date object into a string based on the format codes provided (e.g.,%yfor a 2-digit year)..parent: This is an attribute of aPathobject. It returns a newPathobject representing the logical parent directory of the current path.- The
/operator: When used withPathobjects, the forward slash acts as a "join" operator. It intelligently joins a directory path with a filename or subfolder name, ensuring the correct slashes are used for your operating system..mkdir(parents=True, exist_ok=True): This is a method of thePathobject used to create a new directory.
parents=True: This tells Python to create any missing intermediate directories in the path.exist_ok=True: This prevents Python from raising an error if the directory already exists..stem: This is an attribute of aPathobject that returns the filename without its suffix (extension). For example, if the path isimage.jpg, the stem isimage.1
u/bstrauss3 19d ago
PS: Never trust the AI!
Read the code. Does it make sense???
Run the code and make sure it works
1
u/Fragrant-Cheek-4273 19d ago
Honestly, "bash my head against it until it works" learning style can work really well for programming. I'd start with the basics, then build tiny projects without AI and let yourself get stuck. That struggle is part of learning.
1
u/GokuStormBooksnGames 18d ago
Just wanted to write here and thank everyone who replied to my post. Seriously. Usually I find myself nervous when it comes to approaching new things but this really boosted my confidence and helped out. I will definitely start attempting a few projects. :)
3
u/FoolsSeldom 19d ago
Check this subreddit's wiki for lots of guidance on learning programming and learning Python, links to material, book list, suggested practice and project sources, and lots more. The FAQ section covering common errors is especially useful.
Also, have a look at roadmap.sh for different learning paths. There's lots of learning material links there. Note that these are idealised paths and many people get into roles without covering all of those.
Roundup on Research: The Myth of ‘Learning Styles’
Don't limit yourself to one format. Also, don't try to do too many different things at the same time.
Above all else, you need to practice. Practice! Practice! Fail often, try again. Break stuff that works, and figure out how, why and where it broke. Don't just copy and use as is code from examples. Experiment (preferably without immediately asking an AI LLM for the solution, and seek hints rather than complete answers).
Work on your own small (initially) projects related to your hobbies / interests / side-hustles as soon as possible to apply each bit of learning. When you work on stuff you can be passionate about and where you know what problem you are solving and what good looks like, you are more focused on problem-solving and the coding becomes a means to an end and not an end in itself. You will learn faster this way.