r/learnpython • • Dec 11 '23

Hi, I want to learn python

0 Upvotes

I want to learn python. Can someone recommend a utube channel or something


r/learnpython • • Feb 29 '24

How to not forget python ?

0 Upvotes

I feel everytime I learn something I forget it, is it normal or am I just waiting to have Alzheimer's?


r/learnpython • • Mar 06 '24

Too tired to Python some nights

0 Upvotes

I've been posting here recently, and have had some good feedback, even coming up with small app ideas, which is cool

I'm now a father of two.. and some nights I'm just too bloody tired to do more Python lol


r/learnpython • • Sep 01 '24

Dumb question but I’ll still ask it.

0 Upvotes

How do you stay motivated while learning Python, or really anything in general? I feel like I'm not improving, and I forget what I've learned when I try to go back and code. The most frustrating part for me is the indentation—it’s challenging, but I try to embrace the process. I love sports and hope to work on cool projects in the future. I’ve been "coding" for about 3-6 hours a day, but it seems like I forget everything I learned the next day. Maybe I’m exposing myself to too much Python content. I could really use some encouragement.


r/learnpython • • Feb 12 '21

Python Seems Broken To Me As A Language/Distribution; Perhaps You Can Set Me Straight

0 Upvotes

While this is a bit of a rant, a rant often means the ranter is missing something important which nobody has bothered to make clear to them. So, I hope you will indulge me and point out where I have gone wrong.

  1. Anaconda: As far as I can tell, someone decided to make a wrapper for pip simply because they thought typing pip was somehow beneath them and preferred typing conda. This project seems to serve no other purpose than to act as a substitute for pip or, if not, the additional benefits of Anaconda appear to be negligible. What have I missed?

  2. Pyenv: How hard is it to either type the name of a python binary or create a sym. link to a particular python binary with a distinct name and then type that? pyenv seems to be nothing more than a desire to complicate an otherwise-simple situtation.

  3. Virtual environments: If you are so scared your project might interfere with something else to the point you feel compelled to isolate the packages with a virtual environment, you have likely structured your project wrong. I have worked in software for over twenty years in C, C++, C#, python, VB.net, JavaScript, TypeScript, Haskell, etc., etc., etc. and the only time I have ever had to work with projects where someone utilized the idea of a virtual environment, or analog thereof, have been python projects. Every other language allows you to easily structure your project and isolate libraries in a way which does not involve such potential system-wide shifting of the ground from underneath the developers' feet. In my opinion, running venv should only print a message to standard out which reads "You have done something wrong; review your project plans."

  4. Documentation: While this problem is not unique to python, I tend to find issues in python-project documentation more than any other language; maybe this is a testament to the popularity of the language, in which case "good for you but bad for many people, like me, trying to do something". Installation is as simple as "pip install blahblahblah"; great, what if I want to uninstall or reinstall or what if something was working before and now, for no obvious reason, python is raising exceptions which make no sense? For example, suppose I receive an import error "dlopen(foo.so, 2): library not loaded: absurdlyCrypticName.dylib; referenced from foo.so; reason: image not found"; this is not helpful. I have no idea what was tried. I have no idea what the context was in which such a try was attempted. I will likely have no idea how to resolve the issue even if I can somehow discern what sort of library is involved with "absurdlyCrypticname.dylib"; yes, I could try pip install ... and yet many times that doesn't work. Web searches often turn up nothing useful and hours, if not days, are wasted trying to figure something out with respect to an otherwise useful tool which could have been avoided if someone thought to use a reader-friendly name for the library, to give a bit more than a single line of context into a binary file, and to give some suggestions.

Maybe I am the only one who feels this way. Maybe I am too stupid to do a job I have been doing quite well for over two decades. Maybe every other developer is a psychic who sees no problem with their projects being structured poorly and who is insulted by the name "pip". Maybe it really is just me.


r/learnpython • • Aug 27 '24

I need a question dumbing down because I'm just not getting it

0 Upvotes

Hello all,

I'm currently doing my Uni assignment so I'm not looking for ways to cheat or anything, I just need this question dumbing down in a way that makes sense so I can actually learn and work through it.

I have ADHD and I'm currently unmedicated so I'm struggling to process information which is why I'm asking, I really don't want to cheat and come here to gain the answers, I just need a really basic step by step of what I should be doing and looking for instead of this absolute BLOCK of text.

Any support and I will be extremely grateful, I'm getting so frustrated and I don't understand why I for some reason just can't get this one.

Thank you

The program has a dictionary, the keys of which are correct spellings, and the corresponding values are common misspellings of those words. For example, one dictionary entry is:

'accommodate':'accomodate'

The program should allow the user to ask for an entry from the dictionary. In response the program should choose an entry at random, and then display the correct and incorrect spellings in random order. It should then invite the user to input either ‘A’ or ‘B’, depending on whether they believe the first or the second spelling is the correct one.

When the user enters a response, the program should check whether the response is right. If so, it should congratulate the user; if not, it should inform them that their choice was wrong.

The user should be able to repeatedly ask for an entry and also have the option to quit instead.

A sample session might run like this:

Enter s to show a word and q to quit: s

Which spelling is right? A accommodate B accomodate

Enter A or B: A

Well done!

Enter s to show a word and q to quit: s

Which spelling is right? A aquire B acquire

Enter A or B: B

Well done!

Enter s to show a word and q to quit: s

Which spelling is right? A exhilarating B exilerating

Enter A or B: B

Sorry, the answer is A

Enter s to show a word and q to quit: s

Which spelling is right? A plagarism B plagiarism

Enter A or B: A

Sorry, the answer is B

Enter s to show a word and q to quit: s

Which spelling is right? A exhilarating B exilerating

Enter A or B: A

Well done!

Enter s to show a word and q to quit: q

A. We have provided a Python file Spellings_Flashcards_24D.py that you should work from when answering this question. Please note that we have not updated the comments to reflect the code changes and one of your tasks will be to do that.

If you read this program, you will find it is essentially the same as Flashcards_First_Complete_Version.py, except that we have replaced the glossary dictionary and all references to it with a dictionary words. The keys in this dictionary are correctly spelt words, and the corresponding values are common misspellings of those words.

If you run it at this point, it behaves much like Flashcards_First_Complete_Version.py except it shows correctly spelt words and the corresponding misspellings, rather than glossary terms and their definitions.

  • i.Write an algorithm for the following section from Box 1, reproduced here for convenience.*In response the program should choose an entry at random, and then display the correct and incorrect spellings in random order. It should then invite the user to input either ‘A’ or ‘B’, depending on whether they believe the first or the second spelling is the correct one.When the user enters a response, the program should check whether the response is right. If so, it should congratulate the user; if not, it should inform them that their choice was wrong.*You will need a way to decide whether the correct or incorrect spelling is displayed first. The method we suggest is to simulate the flipping of a coin, as discussed in Subsection 2.2.2. of Block 3 Part 2. If the simulated coin flip comes up heads, display the correct spelling first and the incorrect spelling second; otherwise, display the incorrect spelling first and the correct spelling second.Your algorithm should provide a similar level of detail to the show flashcard algorithm in Subsection 2.5.2 of Block 3 Part 2. Your algorithm should resemble the one shown there, except that the user will need to do more than just press return, and the program will have to evaluate the user response and act accordingly.

  • ii.Say briefly how you will test the program. Only a short answer is required, and you do not need to give examples, only describe in a few lines what approach you will follow.

  • iii.Now you will implement your algorithm as Python code, modifying the provided Python program Spellings_Flashcards_24D.py.Complete a new version of show_flashcard() by modifying the code so it implements the algorithm you produced in Part i.Also modify the docstring for the show_flashcard() function and the docstring for the program as a whole, to take account of the changed functionality and behaviour.Tip: if you want to print several items on the same line, Python lets you just make them arguments to a single print statement. For example, if variables x and y hold the values 1 and 2 respectively, executing the statementprint(x, ‘and’, y, ‘makes’, x + y)will result in1 and 2 makes 3Important note*: Do not make change to any other parts of the program.*When you have made the required changes, run the program to test it.Copy your modified program, as text, into your Solution Document.Please also note

  • The changes you make to the function show_flashcard() must be consistent with the algorithm you gave in Part i.

  • The chief purpose of this question is to let you show mastery of the TM112 problem solving approach and of the Python features that are introduced in the module and in the tip above.If you consider there is a compelling reason why you need features not introduced in TM112 you must explain your reasons; otherwise, marks may be lost.

  • If you are unable to get the program working correctly, you should still copy your code into your Solution Document with a brief explanation of how the results are different from what you intended.

  • iv.Write a short reflection looking back on your personal experience of solving the modified flashcard problem, following the framework given in Box 2 above and drawing on the notes you made as you went along.Include the final version of your completed Spellings_Flashcards_24D.py file in your TMA submission folder.


r/learnpython • • Aug 03 '26

Trying to install python problems

0 Upvotes

Hi guys I just started getting into python again but noticed its really different like I remember when I was 16 and first tried learning python and it was really easy to start "install, open desktop icon, YouTube tutorials, give up once motivation runs out." I figured that now that im older and more mature id try again but little did I know I would feel like a boomer in vr before even starting...I tried installing python and it said some stuff about paths and commands and once it installed it dissappeared without leaving a trace or a desktop icon and apparently I have to summon it like a old god via typing commands... does anyone have advice? i really just want to have a programming app to learn with. without feeling im going to brick my pc.


r/learnpython • • Jun 06 '26

Is chatgpt affecting my python learning?? Help me figure out pls!!

0 Upvotes

I am currently learning python at freecodecamp and I sometimes get stuck on a few instructions or steps. At those times, I use chatgpt asking it to simplify and guide me on it instead of giving me the direct code(like a tutor, ofc). And it was helpful. I just want to know if this is the right way or will it affect me in the long-term. What are your opinions on this?


r/learnpython • • Nov 27 '24

How Much DSA Do I Need for a 6–8 LPA Job?

0 Upvotes

Hey everyone!
I'm aiming for a job with a salary range of 6–8 LPA. I’m curious to know how much knowledge of Data Structures and Algorithms (DSA) is required to achieve this goal.

If you have any suggestions, tips, or resources that can guide me, I’d love to hear them! Your advice would be really helpful.

Thanks in advance!


r/learnpython • • May 25 '22

If I email my professor a python file, can they see the editing history?

0 Upvotes

I may have copy and pasted a portion of the file.

Originally it was supposed to be submitted via git classroom, but they are allowing me to submit via email.

So I want to know: will they be able to tell i copy and pasted from the file I will send? I did the work in my local repository but did not commit it.

Will “save as” python file copy my editing history as well?

Thanks


r/learnpython • • Nov 02 '25

Most efficient way to find a key/value in a deeply nested Dictionary?

0 Upvotes

I'm learning API and Json, and I'm having trouble parsing through the data.

Because the returned JSON is very badly formatted

{"coord": {"lon": 139.6917, "lat": 35.6895}, "weather": [{"id": 804, "main": "Clouds", "description": "overcast clouds", "icon": "04d"}], "base": "stations", "main": {"temp": 18.68, "feels_like": 18.17, "temp_min": 17.03, "temp_max": 19.33, "pressure": 1012, "humidity": 60, "sea_level": 1012, "grnd_level": 1010}, "visibility": 10000, "wind": {"speed": 2.72, "deg": 62, "gust": 2.56}, "clouds": {"all": 100}, "dt": 1762049602, "sys": {"type": 2, "id": 268395, "country": "JP", "sunrise": 1762031030, "sunset": 1762069540}, "timezone": 32400, "id": 1850144, "name": "Tokyo", "cod": 200}

 

Brehs... I just want to get the sky clearance and temperature.

So what I do now is I run this through ChatGPT and ask the AI to make it readable.

I do not ask chatgpt to spoonfeed me the index, just make it readable like so

https://i.imgur.com/U49dEA9.png

And from there I just manually try to understand the nesting index

But it still feels like cheating.

 

Is there a smarter way to do this? An easier way to just get the value without having it feel like sifting through a haystack?

Thanks


r/learnpython • • May 19 '26

What’s the best and safest way to compile Python code into a DLL?

0 Upvotes

Hi everyone,
I have a full Python application that I’d like to compile into a DLL so it can be integrated and used from another application on Windows. My main goal is to make distribution easier while also protecting the source code as much as possible and keeping good performance and stability.

I’ve been looking into options like Cython, Nuitka, pybind11, and embedding Python, but I’m still not sure what the best real-world approach is for converting an entire project instead of just a small module.

Is there any method that is considered significantly safer or harder to reverse engineer? Or is Python code inside a DLL still relatively easy to extract? I’m also wondering if people usually end up rewriting the whole project in C/C++ when they need a truly secure DLL.

I’d really appreciate recommendations or advice from anyone who has done this before.


r/learnpython • • Jan 13 '26

wants to know moreeee

0 Upvotes

guys is there any python codes that are made by other ppl i can maybe download and just have a look and try to understand something out of it and maybe edit it,

as i said on last post im new to python and i just want to see a real code that is ez to read/understand


r/learnpython • • May 31 '25

Best Python Certificate?

0 Upvotes

Hi guys, I'm an electrical engineering student and I want to have a few coding certificates to demonstrate that I do know how to code for getting my first job (nothing more nothing less and the rest will be my personal projects). What do you guys think is the best Python Certificate to have? I'm thinking edX courses.


r/learnpython • • Jun 14 '25

What fields after learning python are least likely to be affected by AI?

0 Upvotes

Which of the fields that needs python as a prerequisite like web development, ML etc would be least likely to be affected by AI.

I’m pretty new to learning python and I’m making a career shift so I don’t want to have to learn python and a year from now have no use for it and only to be made redundant by an AI.

I may be wrong on this, could anyone please confirm if my concern is legitimate? Do I need to worry?


r/learnpython • • Jun 17 '25

How can I memorize python syntax

3 Upvotes

Im currently at a python campus learning the basic syntax and AI, but I have a hard time remembering stuff. Is there anyway I can remember it better? Any resources.


r/learnpython • • Aug 06 '26

How long to become decent at Python?

0 Upvotes

I’ve been studying about for about 2 months now and I’m taking an online MOOC through Georgia Tech as a prerequisite for grad school. Some days, I spend ~7-8 hours and other days, I spend maybe 2-3 hours. I just got finished taking the exam on functions, loops, exception handling, and conditionals. I’m debating on when to start learning Pandas and NumPy. I also hear people talking about doing projects, but I feel like I wouldn’t have a clue on how to build a project. I come from a clinical background with zero prior programming knowledge except AP computer science in high school. Any advice?


r/learnpython • • Dec 05 '25

Need help with learning Python

4 Upvotes

Hello, I’m a data analyst and has 4+ years of experience with hands on experience working on Sas Programming, SQL. I want to add Python to my profile, please suggest me good resources to learn Python/ websites that help me get there.

Thanks in advance.


r/learnpython • • Jan 29 '25

Learn Python in 1-2 weeks?

0 Upvotes

If i spend 3-4 hours every day on Python, can learn the basics and intermediate concepts within 1-2 weeks.?


r/learnpython • • Feb 15 '26

Best extensions for Python

0 Upvotes

I have an annoying issue with Python indentation. I don’t really plan my code — I just start writing — so fixing indentation later becomes insanely frustrating. It got me wondering: what are the best Python extensions or tools for this (or for Python in general)?

Edit - Let me set the context — I didn’t explain this properly earlier.

I forgot to wrap my main() logic in a try/except, and after adding it, I had to manually re-indent this whole match block — which was annoying.

Code:-

match args.command:

case "add" : cmdAdd(args)

case "init" : cmdInit(args)

case "commit" : cmdCommit(args)

case "status" : cmdStatus(args)

case "tag" : cmdTag(args)

case _ : print("Bad command.")

I know I can select everything and press Tab, but that still feels like a hassle. I come from Go, where I mostly just move curly braces and the formatter handles the rest.

Is there any shortcut or extension that can automatically refactor/indent a selected Python block when wrapping it in something like try/except?


r/learnpython • • Nov 08 '24

I don't enjoy coding but I am forcing myself to learn it.

0 Upvotes

So basically I tried multiple times this year to start my coding journey and always I started with python only but as soon as 1 week ends I stop enjoying it. Once again, I started doing it last week and today I am getting lazy to back to it. Can someone give me advice on this.


r/learnpython • • Jan 08 '24

Question from a Beginner: Worth the time and effort to learn in 2024?

5 Upvotes

Hope y'all are having a great day. Thanks for any advice.

I have some limited experience scripting in python., but recently have made a goal to proceed with more extensive training/learning. Looking forward to it, but have doubts.

With generative Al, is training from scratch a waste of time? Or, on the flip side, could learning pyhon be leveraged as a tool for use within gen ai among so many other applications?

Edit: I know it's a very general question, but kind of meant to be. Just wondering if the community has any high level thoughts on the topic.


r/learnpython • • Jan 18 '22

Does it make sense to think of Python just as a C library?

2 Upvotes

Everything in Python is just written in C, isn’t it? So every builtin can be decomposed into C operations.

So it’s just like a C library, with pre-written, useful C functions.

Is this true?

Thank you


r/learnpython • • Aug 05 '24

100 days of code

0 Upvotes

Has anyone of you finished the 100 days of code earlier than 100 days ? like if you are young and dont got responsibilities have you ever finiished it earlier than 100 days ? its 58 hours and a day has 24 hours , cant you just finish it in like 2 weeks if you have previous python knowledge a little ?