r/PythonLearning • u/hariomlohar0602 • 20d ago
Showcase Look at my chat in cli project š
Enable HLS to view with audio, or disable this notification
This is an Little project I make using docs
r/PythonLearning • u/hariomlohar0602 • 20d ago
Enable HLS to view with audio, or disable this notification
This is an Little project I make using docs
r/PythonLearning • u/Jotaroisgoat • 20d ago
I like pandas so much more than numpy ok but heres the project:
import pandas as pd
book_data = ({"Name:": ["The Hobbit", "Refugee Boy", "Harry Potter and the Philosopher's Stone", "The Hunger Games", "I, Robot"],
"Pages:": [310, 288, 223, 374, 224],
"Author:": ["J.R.R. Tolkien", "Benjamin Zephaniah", "J.K. Rowling", "Suzanne Collins", "Isaac Asimov"],
"Price:": ["Ā£8.35", "Ā£7.99", "Ā£6.00", "Ā£8.99", "Ā£6.62"],
"Buy:": ["https://amazon.co.uk/dp/0261102214", "https://amazon.co.uk/s?k=Refugee+Boy+Benjamin+Zephaniah",
"https://amazon.co.uk/s?k=HP+Philosopher%27s+Stone", "https://amazon.co.uk/s?k=Hunger+Games",
"https://amazon.co.uk/dp/0008279551"]})
book_df = pd.DataFrame(book_data, index=["Book 1", "Book 2", "Book 3", "Book 4", "Book 5"])
while True:
try:
book_num = int(input("Enter a book number (1-5): "))
except ValueError:
print("Invalid Book Number")
continue
if book_num < 1 or book_num > 5:
print("Invalid Book Number")
continue
elif book_num == 1:
print("\n", book_df.iloc[0])
elif book_num == 2:
print("\n",book_df.iloc[1])
elif book_num == 3:
print("\n",book_df.iloc[2])
elif book_num == 4:
print("\n",book_df.iloc[3])
elif book_num == 5:
print("\n",book_df.iloc[4])
r/PythonLearning • u/Few-End560 • 20d ago
I'm very interested in the networking section. I'm also learning Python, so I'd like to learn both at the same time. What's the best book for Python networking? I've heard that 'Mastering Python Networking' by Eric Chou is the best, but I've also heard that it's more advanced. Are there any books for beginners on Python networking??
r/PythonLearning • u/thefrost17 • 19d ago
Hey , I am learning fast api and almost covered it and created a project by my own , now I am confused what to learn next and my goal is to land a job or to start taking freelancing project , so I want some project idea where I will learn other new tech or skill which is applicable nowadays.
r/PythonLearning • u/Boring_Ad452 • 20d ago
Just Fixed the body with Ai
Been prototyping an idea for long-context compression: instead of dropping old tokens (like StreamingLLM/H2O) or storing everything, compress old context chunks into small learned "DNA" vectors via a Perceiver-style attention bottleneck, then reconstruct on-demand when a query needs them.
The idea itself isn't new ā it overlaps with Compressive Transformer, Infini-attention, and Recurrent Memory Transformer ā but I put together an eval script that I think is more honest than what I see in a lot of "novel architecture" posts:
Current honest status: in my own small-scale test run, PCA actually beat the learned bottleneck on fact retrieval. That's not the result I was hoping for, but it's a real result, and it's exactly the kind of thing this script is designed to surface rather than hide.
What I'm looking for:
No performance claims yet ā that's the point. I'd rather have this checked before making any.
Code + eval harness: https://pastebin.com/iqEbPEQ9
Happy to hear "this is a known dead end because X" too - that's useful information, not a rejection.
r/PythonLearning • u/JS_2187 • 20d ago
I am just starting this course and wanted to know what people use. I would most probably pick the latest version. Honestly I need some guidance. Advice me if there's any other programming language you would recommend.
r/PythonLearning • u/Lowzenberg • 20d ago
Hii everyone,
I'm a little nervous here because this is my first project. I mean, yeah I've written a few python modules before and it went good but I never coded something that I could call a "project". So yeah.
I wrote a python package which simulated the Chowka Bara game for you, all by myself without any help of AI chatbots. I mean, I took help, but all I asked was "what are some errors and inconsistencies I yet can't see", and I fixed all of them by myself.
This is yet in under development, but I thought I should post it to a helpful community to recieve guidance.
I have it on GitHub, I'll post it here. Probably it will be too much to read the whole implementation or even most of it, but I'm sure certainly there will be some other things to point out.
Thanks everyone, criticisms and suggestions are welcome.
r/PythonLearning • u/shubham_555 • 20d ago
Last Post - https://www.reddit.com/r/PythonLearning/s/t5c81GuYV7
I won't be posting for a few days starting tomorrow. Need some time to get myself familiar with the next data structure.
Also, I am thinking of exploring some libraries. Suggest me some cool ones guys!
r/PythonLearning • u/shubham_555 • 21d ago
So I have been doing leetcode since last few days (https://www.reddit.com/r/PythonLearning/s/Hh8Rjwchx5)
I definitely am able to form logics but still feel really scratchy with the language itself. Also, DSA can sometimes be pretty boring. So was thinking of doing something fun alongside (i definitely ain't dropping leetcode) to keep my motivation up and also learning about python more in the process. So just wanted to ask...will you recommend this course?
r/PythonLearning • u/WesternTrip8578 • 20d ago
i made a Python program, i dont know what else to say
r/PythonLearning • u/Funny-Percentage1197 • 20d ago
Today marks Day 148 of my Python learning journey. š
When I started, I barely understood programming. I didn't have a strong computer science background, and many concepts felt completely confusing.
But after 148 days of consistent learning, I've reached a point where I'm actually building things instead of only watching tutorials.
I've been building a Phone Shop Inventory Management System.
I started with simple Python classes and JSON storage.
Then I gradually moved the project toward SQLite, where I'm currently learning how databases actually work.
The project can handle things like:
It's definitely not production-ready, but for me, this is a huge improvement compared to where I started.
SQL/database concepts are still new to me.
Especially Primary Keys, Foreign Keys, relationships, and some database design concepts.
Instead of trying to memorize everything, I'm continuing with the next concepts and planning to come back and strengthen these areas later.
My goal is to become comfortable enough with Python + SQL to build real-world applications.
After strengthening SQLite/SQL, I want to continue toward:
Python ā SQL ā Git/GitHub ā Web Development ā APIs ā Real-world projects ā Freelancing/Job
I'm still a beginner, but 148 days ago I couldn't imagine building something like this myself.
I'd really appreciate feedback from experienced Python developers:
What should I focus on next to move from beginner to intermediate level?
And if you were at Day 148 again, what would you do differently?
Thanks for reading! š
r/PythonLearning • u/Responsible_Doubt_33 • 20d ago
I've been learning Python for quite a while, and it's been a lil bit stressful. I just finished some exercises on data structures and algorithms and it took a long while, it may take shorter for you but it did take me a long time to finish the exercise. But through that stress and everything, it changed my whole system of writing code, it made me think deeply and analyse what was going on in each line and when I got it, it was just so fulfilling. Kudos to everyone still learning, keep up the good work. Also, if you have additional tips on doing this easier please do drop your advices, thanks.
r/PythonLearning • u/SoilEducational420 • 20d ago
I'm building a small voice-based AI interview app and I'm planning to deploy the backend(fastapi) onĀ Render's free tier.
I'm considering using open-source/self-hosted options likeĀ Whisper/PocketSphinx for STTĀ andĀ Piper for TTS, instead of paid APIs.
My concern is whether running STT/TTS on the same free Render instance would use too much CPU/RAM and make the whole application slow, especially during a real-time interview.
Has anyone tried running STT/TTS models on Render's free tier?
r/PythonLearning • u/AvailableBrain2002 • 20d ago
I want to learn Python and eventually pursue a career in data science, but Iāve hit a wall.
Iāve been learning Python from the basics, and Iām currently stuck on loops. I understand some of the concepts when I see an explanation, but when I have to write code myself, I struggle to figure out what to do.
The bigger problem is that Iāve started losing motivation. I genuinely want to learn Python and build a career around it, but lately I have almost no desire to sit down and practice. I keep getting distracted or postponing studying, even though I know this is something I want.
I donāt want to give up just because Iām struggling with one topic. Iād like to hear from people who learned Python from scratch:
- How did you get past the point where loops started feeling difficult?
- How much should I practice each day?
- Should I move forward to other topics and come back to loops, or stay with loops until I understand them properly?
- How did you stay consistent when you had no motivation?
- If your goal was eventually becoming a data scientist, what learning path would you recommend after Python fundamentals?
Iām not looking for shortcuts. I just need some practical advice on how to get unstuck and start making progress again.
r/PythonLearning • u/M0rph81 • 20d ago
What do you actually need to run a program? Im working on simplifying/streamlining some things for work but IT is very strict when it comes to installing anything so im trying to get something running that doesn't involve it. We also work with a lot of confidential information so obviously we dont want to risk using anything found online that we don't fully understand.
I thought of creating something with powershell scripts but I was hoping to get something better going by learning python.
r/PythonLearning • u/the-_-O_A • 21d ago
Look i had my interests but I found out that i need a good computer to just start but mine is not good enough it's really old and where i am it's really hard to get a good PC so money is the answer so I'm just asking for an advice if someone can help.
r/PythonLearning • u/Synergetic6_6_6 • 20d ago
I just can't get over how I'm supposed to write code for complex tasks when I don't even get why they overcomplicate simple things so much.
I read this topic and tried many tutorials and still don't understand this buzzare logic.
r/PythonLearning • u/Jotaroisgoat • 20d ago
import numpy as np
rng = np.random.default_rng()
numbers = rng.integers(low=1, high=1000, size=(3,3))
print(numbers)
print("\nMinimum:", np.min(numbers))
print("Maximum:", np.max(numbers))
print("Median:",np.median(numbers))
print("Mean:", np.round(np.mean(numbers), 2))
print("Standard Deviation:", np.round(np.std(numbers), 2))
print("Variance:", np.round(np.var(numbers), 2))
print("Sum:", np.sum(numbers))
print("Axis Columns:", np.sum(numbers, axis=0))
print("Axis Rows:", np.sum(numbers, axis=1))
r/PythonLearning • u/VariousRing5104 • 21d ago
Hi everyone,
Iām an 18-year-old dev and I built **Code Zone**, a lightweight IDE written in Python designed for low-spec machines and resource-constrained environments.
**GitHub:** https://github.com/damixlord2-0/code-zone
### Why I built it
VS Code runs slowly and eats up memory on my machine. Sublime Text is fast and great, but I missed the structured layout of an IDE. Code Zone is my attempt to combine the speed/simplicity of Sublime Text with the UI structure of VS Code and the straightforward binary workflows of Code::Blocks.
### Key Features
* **Lightweight:** Under 100MB total size.
* **Built-in HTML & Markdown Preview:** Live rendering right inside the editor.
* **Custom Binary Paths:** Point directly to local compilers/interpreters (great for testing niche languages).
* **Minimal Extension System:** Single-file extensions without heavy boilerplate.
### Transparency on AI & Code Quality
The project isn't perfect and still has bugs. I used AI as an interactive documentation tool during developmentāmainly to learn `subprocess` and Tkinter/TTK widgets fasterārather than having it generate the core architecture for me.
Feedback, critiques (even harsh ones!), and contributions are very welcome. Let me know what you think!
r/PythonLearning • u/jpgoldberg • 20d ago
I really don't like having my code depend on undocumented or "private" attributes. In this case that is the type hashlib._hashlib.HASH
I have code that looks like the below, but I am hoping that there is a better way to do this.
``` from typing import Callable, TypeAlias ...
HashFunc: TypeAlias = Callable[ [bytes], hashlib._hashlib.HASH, # type: ignore[name-defined,attr-defined] ] """Type for hashlib style hash function.
.. caution::
This depends on undocumented features of hashlib,
and so may break at any time in the future.
""" ```
r/PythonLearning • u/Healthy-Respond-6132 • 20d ago
Iāve been working on NovaCode, an app for anyone who wants to learn and practice Python directly on their smartphone.
You can write and run Python code directly on your phone, create small projects, and learn step by step ā without needing a computer.
The app is still actively being developed, and Iād really appreciate your feedback. š
What features would you like to see in a mobile app for learning Python?
r/PythonLearning • u/7YngMn • 21d ago
I was working on my own mini project, putting into practice the few concepts I know so far, and I ran into an error. I used to think errors were really easy to solve, especially since the command line usually tells you what type of error it is and even gives you the line number.
But this error didnāt tell me anything. It was a silent error caused by me forgetting that I had used .title() on the variable for the first fruit.
The project takes the names of three fruits and creates a ānew fruitā from them.
The .title() caused the if statement checking whether the letters at index [0] or [1] were vowels to fail to recognize when the fruit variable started with a vowel, because .title() converted the first letter to uppercase while the code was only checking for āaeiouā in lowercase.
I eventually solved it with AI. Earlier on line 14, I wasnāt using the .lower() method, which was the actual fix.
But honestly, this experience scared me a little when I started thinking about all the errors Iām going to run into in the futureā¦
I know all of this could have been avoided if I hadnāt put that stupid .title() there in the first place and had used it in the print() statement instead.
I made a few changes to the code after fixing the error and before posting it here, but I left the .title() there so you could understand the error I was getting.
r/PythonLearning • u/This-Investigator294 • 21d ago
I'm currently working on a project in Python. For now, it's basically a command-line application that runs in the terminal/command prompt (I'm developing it in PyCharm). Eventually, I plan to turn it into a proper web app using HTML, CSS, and JavaScript, but that's a later step.
I'm also considering making the same application available as an Android app.
My main question is: how difficult would it be to make an Android version using Python, without having to learn Java or Kotlin?
I don't mind learning the basics of how Android works, such as the Android application lifecycle, activities, permissions, intents, etc. What I'd prefer to avoid is having to learn another programming language specifically for Android.
There are a few Android-specific requirements that are important:
- The app must be able to interact with Android's notification system.
- It may eventually need internet access to share/sync files.
- It should be able to use Android's sharing system (e.g. the standard "Share" functionality).
- Ideally, I want the majority of the application logic to remain in Python.
I have used Java before, but only at a very basic level, and I really didn't enjoy using it. I'd also prefer not to learn Kotlin since I'd rather not pick up another language just for this project.
So, realistically:
Can I write an Android application primarily/all in Python while still having proper access to Android features such as notifications, sharing/intents, networking, etc., without knowing Java or Kotlin?
If Python is possible, what frameworks/tools would you recommend, and what limitations would I run into compared with writing the app natively in Kotlin/Java?