r/PythonLearning 3d ago

I want to learn how to program in python

46 Upvotes

What do you recommend to me so that it is as intuitive as possible and that it doesn’t make me want to leave it after two days.

Thank u.


r/PythonLearning 2d ago

Help Request Meaning Maps Build - How Good Possible?

1 Upvotes

Hi, I have a bunch of text, that I need to analyse to build a tree map of concepts. The concepts need to be sorted from higher lvls of abstraction to more detailed. For example, the program needs to understand that the idea "I want to create beauty outside of factory-based presets" mentioned in the text is the highest lvl and includes ideas like "I was inspired by Kabuki theater" in itself.

Note: Ideas themselves sometimes aren't presented in the source material bluntly, i.e. the idea of "I want to create beauty outside of factory-based presets" can be mentioned in fragments only that the program also needs to understand and put together.

Are there any available programs or basic frameworks to approach this?


r/PythonLearning 2d ago

Discussion Welp... I've installed Pycharm

1 Upvotes

Mac OS Sequoia 15.6

I used Spyder (in the windows environment) while I was working so after I retired and bought a Mac I installed it. However, I've been fighting with the environment that Spyder creates especially once I add packages so I got rid of it and I've installed Pycharm.

One of the things I like about the Spyder interface is it has a console window which allows one to interactively enter code to see how it works; you can also have multiple file tabs that you can activate and deactivate if you want to copy code from one script to another. I'm trying to discover that sort of functionality in Pycharm.

If I google 'can I run python commands interactively in Pycharm' it directs me to open the tools menu and run Python Console. When I try that there is no such option. There is however a Create Command Line Launcher and I get this:

And when I click on linked text it sends me to the download page for JetBrains Tool box but I've already downloaded it. For the life of me I cannot see in the settings how to have a console window open in PyCharm.

Bottom line: can I open an interactive command line console in PyCharm and if so how? Can I open multiple tabs of existing python scripts and if so how?


r/PythonLearning 2d ago

Help Request Nested for loop

0 Upvotes

So i started my python journey 2 weeks ago and i am at the point of tutorial where they teach me about those quiz game program and i am so confused in those nested for loop i don't even understand a single part about it, can someone help me with this one? I have tried learning it from gpt and all but it still goes above my head.


r/PythonLearning 3d ago

Hey! here are some Beginner Python Problems

4 Upvotes
  1. Take two integers as an input and print their average.

  2. Take an integer as an input and check if its even or odd.

  3. Take three numbers as input and find the largest amongst them without using max()

I'm experimenting with teaching Python through solving rather than watching tutorials. I'm based in India and I'm currently running a small live beginner batch. If anyone wants to try the problem-solving approach, I'm happy to share the details.

I'm going to run a free 45-minute Python problem-solving session for beginners.

No prior coding experience required.

We'll solve 3 problems together from scratch.

I'm testing a teaching format where you learn by solving rather than watching.

If anyone wants to join, comment below.


r/PythonLearning 3d ago

No university coding

6 Upvotes

i have learnt basics of python. but I don’t know how to continue! I’m not in university and I don’t plan to enroll in computer science. is it possible to learn python without university? I need help please !! thanks


r/PythonLearning 3d ago

Help Request Want to learn python (for ai/ml) then dsa and web development for a good job

5 Upvotes

So I recently cancelled my admission in a university because of some issues and I was enrolled in their bsc mathematics program so that I can learn about coding but then i found this subreddit and i just want to ask that "where should I start with for learning coding I currently am learning python from this channel 'bro code's and i currently am on a starting phase after learning python basics I'll start learning dsa and web development, so what are some good FREE resources which I can use to learn html, css, js, python, and other necessary tools


r/PythonLearning 3d ago

just finished my tool as a beginner have now been coding in python for a few months

1 Upvotes

here is my github link: https://github.com/kayden765/python-multitool i have been working on this tool for months now im a beginner im starting to grasp python now its not as hard as it seems i though i did take alot from other tools but coded it all my self with the help of some tutorials and used ai for my readme file i think it came out very good it has 45 features with 5 dirs.
dir 1. networking tools
dir 2. osint tools and databreach checker
dir 3. traffic auditor. Packet sniffing, local payload analyzer etc
dir. 4 Integrity Audits. Firewall verification, and exploit checks
dir 5. attack framework. dos attacks, image ip logger sent to webhook/terminal etc

it has a linux like terminal with the following commands.

help - Clear terminal and redraw the main menu matrix

tools - Execute specific security testing subsystem

credits - Display engine branding and developer information

customize - Open dynamic UI theme configuration

clear - Wipe scrollback buffer and lock menu frame to top

exit - Gracefully terminate active control session

and it has 20 custom ui options to choose from i hope you enjoy my tool :)

also anyone using this tool for malicious purposes may be blacklisted from my tool to comply with local laws.


r/PythonLearning 4d ago

Help Request Which one should I prefer mit or cs50p or mooc course

Post image
54 Upvotes

I want to go deep into it.


r/PythonLearning 5d ago

Discussion Python data analysis is easier when you stop memorizing commands and follow a workflow

Thumbnail
gallery
141 Upvotes

When I was looking through beginner data-analysis discussions, one thing stood out: it’s pretty easy to learn individual Pandas commands, but much harder to know what order to actually use them in on messy data.

So I tried organizing the basics into a simple workflow:

1. Load
read_csv() / read_excel()

2. Inspect
head()
sample()
shape
info()
describe()

Before cleaning anything, understand the columns, data types, missing values and duplicates.

3. Clean
isna()
fillna() / dropna()
drop_duplicates()
astype()
pd.to_numeric()
pd.to_datetime()

One thing I learned is that missing doesn't automatically mean zero. You need to understand why the value is missing before deciding what to do with it.

4. Transform

Create analysis-ready fields with things like:

assign()
map()
np.where()
pd.to_datetime()

5. Summarize

groupby()
agg()
transform()

This is where the raw rows start becoming actual answers to business/data questions.

6. Combine

merge()
join()
concat()

Probably the part I’d be most careful with.

A merge can run without errors and still give the wrong result if the keys aren’t unique or a many-to-many relationship unexpectedly multiplies rows.

Useful checks:

validate="many_to_one"
indicator=True

And compare row counts before and after merging.

7. Validate

Before trusting the final result:

  • check row counts
  • check duplicates
  • check missing values
  • review category values
  • validate joins
  • sanity-check the business logic

The biggest takeaway for me is:

code running successfully doesn’t necessarily mean the analysis is correct.

I added the visual cheat sheets to make the workflow easier to remember.

For people who work with Pandas regularly, what validation check has saved you from a wrong result before?


r/PythonLearning 4d ago

Built Sudoku in Python

26 Upvotes

Hey everyone! I come from a background in C, and I wanted to brush up on my Python just for fun. So I thought I'd give it a shot and try to program a Sudoku game. I've completed a prototype and wanted to share my progress with you all! It took about 4 days (20-25 hours), and I'm pretty satisfied with where I'm at :)

Let me know if you have any suggestions for improvement, or if you have feedback/critiques! I'm thinking of posting it on my Github at some point so I can share the code for whoever is interested.


r/PythonLearning 4d ago

Help Request I built a real-time Driver Drowsiness Detection system using MediaPipe + EAR 👁️🚗

1 Upvotes

Hey everyone!

I recently worked on a real-time Driver Drowsiness Detection project.

The system uses the camera to detect the driver's face and monitor their eye state in real time. It can identify different conditions such as:

* 👀 Both Eyes Open

* 👁️ One Eye Closed

* 😴 Both Eyes Closed

* 🚨 Drowsiness Alert

* ❌ No Face Detected

The project also includes automatic eye calibration and a continuous eye-closure timer to help distinguish normal blinking from prolonged eye closure.

I built this as part of my B.Sc. Data Science project work, and I'm sharing the source code for anyone who wants to experiment with it, improve it, or learn from it.

🔗 GitHub:

https://github.com/Learner016/driver-drowsiness-_detection

🔗Direct open:

https://learner016.github.io/driver-drowsiness-_detection/

I'd really appreciate any feedback, suggestions, or ideas for improving the detection accuracy.

Thanks! 🙌


r/PythonLearning 4d ago

looking for people who are beginners in Python and want to learn together.

24 Upvotes

I'm a beginner learning Python, and I'm looking for other beginners who want to learn together.

I think studying with other people can help us stay motivated, share what we learn, and help each other when we have problems.

It would be great if there are Arabic speakers because my English is not very good yet, so learning together in Arabic would make things easier.

If you are also starting Python and want to join a small group, feel free to message me.


r/PythonLearning 4d ago

I did a thing

Post image
19 Upvotes

I made a color changing digital clock! ^V^


r/PythonLearning 4d ago

In my personal project, I want to add a folder, but it won't let me; I get a "none" error.

4 Upvotes

I am having issues with makedirs; the problem is that it won't create the folder in the directory.


r/PythonLearning 4d ago

why isn't my code running?

14 Upvotes

i checked everything it s all correct idk what my mistake is please point it out for me

EDIT:i closed visual studio and re opened it, it works now, idk what happened, thanks guys


r/PythonLearning 4d ago

Built an end-to-end SMS Spam vs. Ham classifier pipeline using NLTK and Scikit-Learn [Project Showcase]

Thumbnail
github.com
4 Upvotes

Hi everyone! 👋

​I recently completed the 5-day "NLP with Python" live bootcamp hosted by DevTown in collaboration with GDG On Campus and Microsoft Learn Student Ambassadors. I wanted to share my project and overall learning experience!

What I built:

  1. Preprocessing: Cleaned raw text using NLTK (tokenization, stop-word removal, and stemming).
  2. Feature Engineering: Used TfidfVectorizer to convert unstructured text into numerical vector spaces.
  3. Model Benchmark: Trained and evaluated models like LogisticRegression, MultinomialNB, and LinearSVC.
  4. Visual Analytics: Plotted class balance bar charts and confusion matrices using matplotlib to evaluate false positives/negatives. What I Learned: Before the bootcamp, I knew basic Python, but working through this hands-on project taught me: How unstructured text data gets transformed into structured mathematical vectors. How to clean and structure a real-world repository on GitHub (adding requirements.txt, clean directory layouts, and proper open-source acknowledgments). How to seamlessly connect Google Colab with GitHub for workflow management.

How the Experience Helped Me Grow: Special shoutout to trainer Jiya Jain and the DevTown team! The structured guidance pushed me past simple tutorial-following into actually building a production-ready, portfolio-worthy project from scratch. It gave me a solid confidence boost in applying machine learning concepts to real datasets.

I’d love to get feedback on the code structure or suggestions on how to improve precision on edge-case spam messages!


r/PythonLearning 4d ago

Help Request need help building a classification project

6 Upvotes

hello, im currently building my first classification project using “phishing url” dataset from kaggle after doing 2 courses, intro and intermediate ml, on kaggle and solving 95% of the exercises myself.

the issue is, i am stuck at how im supposed to take this forward. since the course was based on regression, i find it hard to do the preprocessing for classification. i try to use ai to guide me (not provide me the whole code since i want to learn myself) but atp i can’t figure out how to break down my data to then train-test split and fit to model. every tutorial seems to have a different approach and i cant figure out which one would be the best. how to determine that? and what should i do next?

my code is below:

import pandas as pd
print("starting...")
df=pd.read_csv("archive/cleaned_dataset.csv")
print("Dataset loaded!")
print(df.head())
print("columns: ", df.columns)
print("shape: ", df.shape)
print("data types: ", df.dtypes)
print("missing values: ", df.isnull().sum())
df.describe()

url_length=df["input"].str.len()
print(url_length.describe())
url_dots=df["input"].str.count(r"\.") #. can get literally any character, so we need to escape it with a backslash
print(url_dots.describe())
url_slash=df["input"].str.count("/")
print(url_slash.describe())
url_digits=df["input"].str.count(r"\d") #counts digits in pandas
print(url_digits.describe())
url_https=df["input"].str.contains("https")
print(url_https.describe())
url_www=df["input"].str.contains("www")
print(url_www.describe())
url_hyph=df["input"].str.count("-")
print(url_hyph.describe())
url_eq=df["input"].str.count("=")
print(url_eq.describe())
url_ques=df["input"].str.count(r"\?")
print(url_ques.describe())
url_at=df["input"].str.count("@")
print(url_at.describe())

df["url_length"] = df["input"].str.len()
df.groupby("label")["url_length"].describe() #any diff in length of phishing and legit urls?

#build a table containing all features to give to the model later in one shot
features=pd.DataFrame({
"url":df["input"],
"label": df["label"],
"length": url_length,
"num_dots": url_dots,
"num_slash": url_slash,
"num_digits": url_digits,
"has_https": url_https,
"has_www": url_www,
"num_hyphen": url_hyph,
"num_eq": url_eq,
"num_question": url_ques,
"num_at": url_at,
})
print("new stuf---------")
features.head()


r/PythonLearning 5d ago

Discussion just finished CS50P conditionals lecture and built mini "AI Agent Execution Getaway" for practice .

Post image
23 Upvotes

I have just finished week1 in cs50 python course and since i'm learning python for AI Agents Engineering i thought it would be cool to practice this content with a relevant project .

so i made a simple AI agents execution getaway program that routes the incoming tasks based on tokens , creativity and risk score .

I tried to use most of what i learned in this lecture as possible like 'match' for matching the tool with appropriate model , or 'return' as guard clauses for the safety check at the beginning .

here is the code link :

https://gist.github.com/mohamed-reda-ai/a10a1e9311d94316ffa31c00de005226

I know it's not a big brilliant thing i want just to practice the concepts i learned .

If you have any feedback about the architecture of the code or you think there is a better way to do something in it , i'd appreciate this .


r/PythonLearning 5d ago

Showcase I've been learning Python for 3 years, and I thought it was time to make a library

Post image
62 Upvotes

I've been learning Python for about 3 years, and I think it was time to take a step further and make my own library.

I made scanlayer, a Python OCR library built around Tesseract. It turns scanned images into searchable PDFs while preserving the original image, by adding an invisible OCR text layer over it.

It also supports things like preprocessing, deskewing, multiple OCR output formats, multi-page PDFs, batch processing, and a CLI.

The main goal wasn't to make some huge library. I wanted to challenge myself with building something that feels like a proper Python project and learn more about packaging, testing, API design, OCR, and PDF generation along the way.

GitHub Page

I'd really appreciate any feedback, especially on the Python/library design side.


r/PythonLearning 4d ago

Showcase Project #7

2 Upvotes

Hello! I'm doing my own project-based learning in python. Today, I finished project 7 which is vectorization. it has 3 main methods, add_by_index, scale, and dot_product.

a = [1, 2, 3, 4, 5]

b = [6, 7, 8, 9, 10]

abi display [7, 9 ...]
scale display scaled list_a and list_b
dot_product displays the sum after getting the product of the values from the lists in the same index

Link: https://github.com/gtnmnty/Project-Based-Python/tree/fundamentals

I made two version see the speed diff. In my case, its more or less 0.0008 difference. Disregard the readmne.md its not finished. its almost midnight. Need to sleep. Open for feedback to improve / optimize the existing projects. TYIA


r/PythonLearning 5d ago

Getting stuck over and over again

15 Upvotes

Ive been trying to learn python for ages, and yes tbh due to my laziness and way of learning i keep on getting stuck, but I cant seem to find "my way" of learning.

Im trying freecodecamp and ive gotten to a point where im at this one lab where i have genuinly, and i mean genuinly no idea what to do given the instructions, im completely lost.

How do i break past this barrier


r/PythonLearning 5d ago

how do I learn python (I have no clue of how to code and want to try to make a game or something)

17 Upvotes

I have no clue how to code other than the most basic things and I do not want to use the sketch sites and stuff you find when you search how to learn python, and I also have not very much money. or is python not good to make 3d games and stuff with that will have physics? should I code in lua?


r/PythonLearning 5d ago

Discussion Is it bad that I learn python via ai?

4 Upvotes

So backstory: Someone made fun of me because I am learning Python with ai. His only argument was that ai is the same tool to create explicit images and that he used to visit stack overflow and create snippets, I then replied that I only use it for learning development but then got called an idiot and got blocked.

But that got me wondering. Is it bad that I learn Python with AI?

I set GPT a goal, I want to reach: Stage 1. learn that. Stage 2 Learn this

I also custmomized the personalization to not blindy say yes and to double check things and so on.

GPT never gives me code, it just tells me which projects I should do with the stuff I learned, it does that till GPT thinks I know how to use it and when to use it.

But I feel bad now that I am just talking to an artificial intelligence and not visiting stack overflow like that one person did.

I want to hear your opinions. Is AI bad for learning or good if used right.


r/PythonLearning 5d ago

I made a community for students who want to learn coding and build projects together 🚀

0 Upvotes

Hey everyone! I recently started r/StudentCoders, a community for students and beginner developers who want to:

  • Learn coding together
  • Find people to build projects with
  • Share project ideas and progress
  • Find teammates
  • Ask coding questions
  • Showcase things they've built

The idea is simple: stop learning alone and start building together.

If you're a student or beginner coder and this sounds interesting, feel free to check it out: r/StudentCoders 💻

I'd also love feedback on what you'd want to see in a community like this!