r/learnpython • u/UniqueCold3812 • Jan 31 '23
Ain't much but I MADE MY OWN GAME USING PYTHON AND I JUST LEARNED PROGRAMMING FOR THE FIRST TIME 4 WEEKS AGO.
Ain't got got many people to share it with. I Appreciate you guy's help.
r/learnpython • u/UniqueCold3812 • Jan 31 '23
Ain't got got many people to share it with. I Appreciate you guy's help.
r/learnpython • u/BobbyRYT • Aug 05 '20
Is Corey Schafer a good youtuber to watch to learn python? Im new and im deciding whether or not to watch Corey Schafer's python playlist or this video https://youtu.be/4F2m91eKmts Pls let me know whether to watch that video or corey scafer's python playlist
r/learnpython • u/[deleted] • Jun 09 '20
As of now every project on my github is just 1 or 2 Python files. I’ve looked at many different projects on github and the majority of them have many different folders and files and I have no clue what their purpose is. Where can I read about properly structuring a Python project?
r/learnpython • u/BRENNEJM • Aug 05 '17
Lynda.com is one of those training/education websites like Coursera & Udemy. An account is usually around $30 per month, but a lot of libraries have an account you can use to access all the courses for free! So if you have a library card, you can log on to Lynda with it!
I'd recommend going to your libraries website and searching for their link to Lynda. Log in through that link. Once you're logged in, just search for Python and tons of stuff comes up.
Wanted to let the sub know because if you're library has an account it's a valuable source of training available to you!
r/learnpython • u/codeinplace • Apr 27 '20
For example if I had an amazing figure template on matplotlib that I might want to use again is there a repository where you should put these things ?
r/learnpython • u/cowinkiedink • Aug 31 '17
I'm going to be taking this to help me learn python.
If anyone else is interested the link is below and there is a slack support group running for all those who want to take it.
r/learnpython • u/Tough_Reward3739 • Oct 29 '25
so our prof basically said “as long as you can explain it, you can use it.”
and now literally everyone’s using some combo of ChatGPT, Copilot, Cursor, or Cosine for their mini-projects.
i tried it too (mostly cosine + chatgpt) and yeah it’s crazy fast like something that’d take me 5–6 hours manually was done in maybe 1.5.
but also i feel like i didn’t really code, i just wrote prompts and debugged.
half of me is like “this is the future,” and the other half is like “am i even learning anything?”
curious how everyone else feels do you still write code from scratch, or is this just what coding looks like now?
r/learnpython • u/[deleted] • Jun 05 '21
I recently started my first job as a programmer with a Web design company. I'm not super interested in Web design specifically but I've been able to talk my way into coding with python for the purpose of webscraping.
I've never considered myself great at python, I still have to Google basic stuff every now and then, but the pride I now feel is overwhelming as I'm actually building something useful.
I'm making a tool that activates every hour to check each of our sites for any console, font, and many other kinds of errors.
The point is, imposter syndrome never goes away. But if I can do it, I know you can!
r/learnpython • u/usernamecreationhell • Jun 27 '20
Object oriented programming is just one of many schools of thought, yet many beginners get the impression that OOP is the pinnacle of Python programming. Then they go to this sub and ask "how to learn/practice classes/OOP", which is like "give me a nail for my hammer". They ask that because they have not yet run into any situation where using classes OOP style is actually a solution to their problem. In fact, in my daily work, while I write lots of classes, very rarely has the reason for doing so anything to do with OOP!
That's why I propose a small, non-exhaustive list of things for beginner Python devs to learn and do that will pay off long before learning OOP will.
Note that in the course of learning these things, classes will organically come up several times where they are actually useful, not just because of the moral imperative that one ought to use classes.
Typing
Typing in concert with a static type checker will allow you to catch certain errors before even running the program. They also make your code easier to reason about for other people. You can also autogenerate docstrings for typed functions and methods.
Typing really becomes useful when you start making use of dataclasses. Instead of mindlessly passing dictionaries around, you can now express that you want data with certain fields of certain types. With libraries like Pydantic or Dacite you can now also validate your data at runtime which is huge if you get data from an external source. The framework FastAPI will even automatically generate API documentation from your types.
Testing
Learn to write automated tests and develop the discipline to actually write them. Learn Test Driven Development. It forces you to write testable code and it's a lot harder to write bad code under the constraint of it being testable.
Use linters and formatters
This is really low hanging fruit. I suggest Black for formatting and https://flake8.pycqa.org/en/latest/ for linting. Run both regularly on your code and fix the things flake8 complains about. Your code will be better in quality and easier for others (and yourself in 3 months) to read.
Read a styleguide
Like the Google Python Styleguide and read all of it.
Read the official Python documentation. Practice reading documentation as opposed to watching tutorials
At some point in time, you should have read all of this https://docs.python.org/3/tutorial/index.html
Once per week read up on one of the built-in functions.
Occasionally, pick a random part of the standard library and try to find something useful in there. You'd be surprised!
Read about application-level software architecture
I recommend Architecture Patterns with Python.
Expose yourself to a well-balanced mix of schools of thought about programming
That includes but is not limited to OOP, functional programming, domain driven design, looking at different type systems and a lot more.
Edit: typo
r/learnpython • u/coreyschafer • Apr 22 '19
I make Python videos on YouTube and get a lot of questions every day. I found these 5 mistakes to be common problems, especially for those who are learning Python. Hope some of you find this helpful. Video here:
Cheers
r/learnpython • u/PetSkunk69 • Jul 30 '22
I'm not sure if this has been posted on here before, but if you are new and struggling to find a project to work on, go on Upwork/Fiverr and look at what people are trying to find freelancers for. Some of those listings will be for things you aren't capable of, but it will help you develop your skills.
r/learnpython • u/denova-trader • Jun 08 '21
Python's been great about supporting Python 2 code in Python 3. But it looks like that's about to be over.
What’s New In Python 3.9 — Python 3.9.5 documentation says:
Python 3.9 is the last version providing those Python 2 backward compatibility layers
To check your code, run python3 with '-W error'.
python3 -W error myprogram.pyThis will only check the code that runs. So it's best to run a good test suite.
The python devs have done a great job of managing compatibility.
r/learnpython • u/kaushik1809 • Aug 28 '20
Hi. I am a complete newbie to this field. I have zero programing experience. But I want to learn Python. Is Udemy's Python: zero to mastery course a good place to start. Or please recommend where and how to start learning Python.
r/learnpython • u/[deleted] • Jun 29 '20
I feel good and I just wanna talk about it.
I'm teaching my self python using the Python Crash Course book, and it has been a blast. Today, I finished a small portion of the Alien Invasion project. At first, nothing made sense (even though I had a really good understanding of classes and functions), it looked like a huge mess.
Everytime the author would try to simplify/refactor code and stuff like that, it would look even more complicated. After every line of code that I copied I would just think "this is not for me." After I decided I was done copying for the day, I let out a fat fart, which motivated me to understand the code no matter what. All this work wasn't gonna go for nothing.
So I sat down (I was already sitting down) and pushed myself to understand what every line of code meant and what it did. I went over the code a few times and suddenly, it all clicked. Man my brain had an orgasm or something cuz that was the smartest I've ever felt in a minute.
I love Python. I love programming. To all of you out there that are struggling with a concept, don't give up, because if my sleep-deprived ass can understand something, you can too.
r/learnpython • u/humaneHolocaust • May 09 '20
I realized this is why I never get anywhere with programming. I learn and learn and maybe do some simple things, but once it comes down to "do a fibonacci function" or "create TicTacToe", "create a calculator"... I just CANT. I don't have that kind of thinking. And then I get depressed and angry at myself and give up for another year. It might be that time again. What's the point of going through all of Corey Schafers videos when I can't apply the simplest things once it comes down to creating something.
Am I really that stupid and everyone is able to do these thing from scratch?
I actually gave up exactly on TicTacToe last time too.
Idk where I'm going with this, I guess I just want to know if people are really able to do this just like that, without googling the solution.
Makes me feel incredibly stupid and defeated once I Google it and its a 2 minute thing
EDIT: Thanks everyone for so many helpful comments! Im reading them all and will take the advice to heart
r/learnpython • u/TorroesPrime • Sep 20 '19
We see this question pop up from time to time. I had an experience at work today that I think exemplifies the answer to this question. I work as an IT tutor for a local college and thus I handle the intro to programming classes. So I had an appointment today.
The student was having trouble with their assignment.
Okay, no biggie. Everyone has trouble with something. So we get to work.
The assignment is to build a program that prompts the user for the measurement of the radius of a circle, performs the calculation to determine the area of a circle with that radius, and display said area. the instructions even include code to import the python math library, assign a value from the Pi function of said library, and the formula Pi(r)^2.
I look at their program.
They have imported Math.
They have Pi assigned to a variable.
They have a variable asking the user for a number
They have a variable named "area" currently set to '100'.
They have a print statement to cast the value of area to a string, and then print said value.
Notice what they don't have? Yeah, any point where the area is calculated. Now if this was just a case of they hadn't worked with basic geometry in 5 years I could just let it go. Sometimes people just need a reminder of what "Pi(r)^2" does, or what Pi is and it's relevance to circles. But no, not this individual.
When I was working with them to understand this, they asked why they needed to know it when the computer should do all that work.
So as far as the 'Do I need to know math to be a programmer?' question, I think this is a perfect example of while you don't need to know advanced mathematics to be a programmer, you do need to be able to deconstruct a problem and understand what needs to be done to solve it. That is the foundational concept of mathematics.
r/learnpython • u/potatoes828 • Feb 08 '22
I can't believe it! I have wrote a simple program and will be implemented by our company!I've always been fascinated by technology in general. However, I took the accounting path and profession.
I have no prior coding knowledge but Python is so easy to understand even for an accountant ;)
Although I've been watching Python tutorials and videos for so long, I've never used it in practice.Last week, I was given an opportunity to use it in my job. The task was to automate formatting and vlookup of 2 excel sheets.
I know that this could have been done using excel itself but they've been using another program written in python as well by a former employee. It was written back in 2015 and a lot has changed since then in the company process.
I'm just so happy that it worked out!
I used pandas, numpy, and tkinter to accomplish this project.Converted it to .exe using autopytoexe.
I hope that more projects will be given my way as I truly enjoy coding.I'm looking into making a new application with database and propose it to my manager so that we can move away from using an excel sheet with about 3,000 lines just for record keeping.
Here's the premise of the problem:
What the problem looks like and the look of output.
Sorry! I still don't know if I can share the code.
r/learnpython • u/darthminimall • Nov 30 '20
Advent of Code starts tomorrow. If you don't know, it's 25 programming puzzles released daily from the 1st-25th of December. It's a good way to practice Python if that's something you're interested in (or any other language, for that matter).
r/learnpython • u/vawksel • Apr 21 '21
I want to teach my 13 year old son programming. What is the best language with the easiest with fastest results today? Is Python a good choice?
I learned programming in BASIC on the Atari then AMIGA Basic and Q-Basic (Gorilla etc) back in the 1980's and 1990's. It was a lot of fun, but these days BASIC isn't really around anymore, and there are probably much better choices to begin with. Over the decades I've done C/C++/ObjC/x86asm/Java/Go-lang/Ruby and a few others, but I'm fairly new to Python however it is easy for me to pick up.
Is Python is a good choice to teach him? What gaming framework or libraries should we use? It seems like Python has very good readablity and syntax for a young mind to grasp.
If not Python, what do you guys think instead?
I learned by modifying existing games in BASIC instead of writing things from scratch. I would change a few variables, numbers, etc and see how that changed the game. Is there an existing Python game we should modify? Or should we start with the basics, e.g. Hello World. ... Ask for the player name or age, do some basic math... then load up some sprites on the screen and move them around?
He wants to make Minecraft Mods at some point but I believe from my experience, that it is too tall of an order to begin with. So looking for a much simpler platform to create some basic 2D games with.
Finally, I want to add we are not in the same physical location. So we will be using Discord for voice chat and likely Teamviewer for screen sharing. If you have any suggestions around this, e.g. something better than teamviewer, please let me know.
Thank you for all your ideas!
r/learnpython • u/eycdicdb • Mar 01 '21
I’ve been learning python since early December now.. I seemed to become comfortable with the syntax and was gaining confidence quickly!
Then I moved on to Django and was quickly sent a reality check as the difficulty level increased really fast... I went back to python and started learning classes... this also is extremely hard to grasp..
While learning classes I realized I didn’t know for loops.. dictionaries.. len/range() nearly as much as I thought I did... the confidence I so quickly built is now gone.
I know the journey to web dev isn’t going to be easy at all.. I’m not giving up.. just wanted to get this off my chest.. I’m going back to the basics this week. Wish me luck. Have a nice week!
r/learnpython • u/testfire10 • Nov 02 '20
Hey everyone, we all are always asking about some good projects to get into while we learn to write Python (myself included). So, I figured I would share my latest idea (haven't started yet), as well as some others that I've done in the past. Let's have a discussion about some of the other things you've each done!
My latest idea is as follows. Backblaze, a cloud backup solution company (no affiliation), for about 7 years has been publishing data on hard drive failure rates from their datacenter (here). What's interesting is that in addition to a blog post about the data, they also provide the raw data, in CSV format that their software generates. You can read more at the link, but basically they have a row for each hard drive every day, along with the drvie details, whether the drive has failed or not, and SMART stats for each drive. I'm thinking it would be cool to practice pandas and take this data and do some plotting and such, and maaaybe try some machine learning stuff to see if we can predict if certain SMART attributes are better predictors of failure than others. There have been studies on this kind of thing before, but it could be an opportunity to learn more about some nerdy stuff like hard drive failure rates, pandas, matplotlib, and SMART stats.
Some of the other projects I've done are:
- a very small program to search the graphics card prices on newegg
- if you're interested in data, here's another github link of a bunch of big datasets
E: wow friends! This got a lot more traction than I thought. Thanks for all the awards and let’s keep the suggestions coming!
r/learnpython • u/Drazxie • Jun 10 '17
Stephanie is an open-source platform built specifically for voice-controlled applications as well as to automate daily tasks and hence imitating much of an virtual/personal assistant's job. It is written in python and I call it more as a framework than an application.
There are lots of amazing things about Stephanie, and I'd be listing few of them.
Beginner Friendly - The Ultimate goal of this project is to create a general awareness among all sorts of people irrespective of their career background to get them interested in 'building something cool', that's why installation is made quite simpler but not the simplest to help general public learn programming in a very different way where they could feel they are making something cool while learning the essence of programming.
Minimal Hardware Requirements, seriously, you got a machine? windows or linux? a speaker of any sort? headphone, headset and a mic which could be anything like inbuilt, bluetooth or just connect a freaking phone.
Privacy, Stephanie offers lots of engines to adjust your privacy as needed, in contrast to other commercial based applications which tracks all of your data (listening everything)
Difference, Now you must okay dude, but how is it different from siri, cortana or echo and other commercial softwares? Well first of all Stephanie is completely open source, even the algorithm which is used to predict the intent (I've written a paper on it which I would highly recommend to anyone interested in this link : https://slapbot.github.io/documentation/resources/algorithm ) is open-sourced so basically you are using a software which is community driven.
Modules, So since Stephanie is completely open-source, you can integrate it with lots of public/private API's to take the application to new level, don't believe me, check out some of it's functionality.
Let's take a brief look at social networks, shall we? How about twitter eh?
You: Hey Stephanie, Do I have any twitter Notifications?
Stephanie: Your latest tweet has been favorited by 20 people, whereas @rayhudon mentioned you stop swooning over real madrid, they ain't gonna win 3 CLs consecutively, that's nuts.
(You can tweet something with the help of stephanie too, similarly I won't be talking about each one, since there are too many functionalities but you are welcome to check it for yourself.)
Okay so How about facebook? Do you ever forget your friends birthdays? well fear not, Now Stephanie got your back.
You: Hey Stephanie, Do I have any birthday reminders?
Stephanie: Oh Yes! your friend Karan Sachdeva has a birthday today.
Wanna write something in facebook as a wall post to show off among your friends? Cmon be humble dude.
You: Hey Stephanie, I wanna do a status update on facebook.
Stephanie: So, What's on your mind?
You: How can mirrors be real if our eyes aren't real.
Stephanie: 'How can mirrors be real if our eyes aren't real.' has been put up as wall post.
Now again this is just social networks, there are many more modules to work with, for instance: Ever wanna note something on fly? no worries mate, your Evernote Account got your back with it's integration, or maybe you want your unread emails? gmail is there for you, weather updates? forecast? latest news* information, forget to wish your mom on mother's day? sync your google calendar man. Are you a movie-freak? Jesus, imdb got you, Restaurants suggestions? Wikipedia? Quick Answers to general IQ questions? And My personal favorite Football Module which has alone more than 30 functions to let you daydream your favorite football team or league.
Or maybe you just wanna integrate some other guy's written module? Awesome with a community and easy integrate methods, do whatever with Stephanie, change it's name to Munni or stick with the current one, It's 100% customizable and the decision is in your hands.
Finally, this is a video where I kind of explain about Stephanie, with few demonstrations if anyone is interested and doesn't wanna read up this post.
https://youtu.be/Pp5dXbWZsrU?t=1m40s
And at the last, the link to main website to know more about it :- https://slapbot.github.io/ As well as the link to algorithmic paper : https://slapbot.github.io/documentation/resources/algorithm/
Github repo of Stephanie: https://github.com/slapbot/stephanie-va Github repo of Sounde: https://github.com/SlapBot/sounder
r/learnpython • u/Colonel-_-Burrito • Feb 17 '21
'''
class Student:
def __init__(self, name, major, gpa)
self.name = name
self.major = major
self.gpa = gpastudent1 = Student("Bob", "Art", 3.0)
'''
Why do i need to use the init and self function? Do i have to make a new init for every single class?
Why cant i just make a regular function like
def Student(name, major, gpa) ??
r/learnpython • u/TheFrogWhoHatesFlies • May 06 '21
Example, today I learned about Git and GitHub and it felt incredible.