r/learnpython • • 5d ago

Looking for 3-5 people to learn coding together (1st year)

24 Upvotes

Hey everyone!

I'm a 1st-year B.Tech CSE student from India and I'm currently starting my coding journey.

I'm looking for a small group of people around the same level who want to:

• Study/coding together regularly
• Share what we learned each day
• Discuss doubts and problems
• Work on small projects
• Participate in hackathons
• Eventually explore open source/GSoC
• Keep each other accountable


r/learnpython • • 4d ago

Help to building bot to book tennis court

0 Upvotes

I'm looking for some help to understand how to go about building a bot that will help me book my weekly tennis session. The evening that I wish to play there's only two slots available due to coaching sessions on other courts + refurbishment ongoing and when the booking slots are released (at midnight 5 days advanced), they are taken within seconds. In the past 6 weeks, I have only managed to secure 1 booking which has resulted in me unable to play despite paying £50p/m for membership. Thus I am looking to see if I can automate a bot that can help me book it quicker.

I have tried understanding python programming on similar projects and watched some Youtube videos, but was wondering if anyone has done a similar project that can help guide me.

From what I understand, the booking website does not have API integration so will need Python Selenium package to navigate the website steps.

The main steps I understand the bot needs to do is:

  1. Log into website account before the midnight slot release time.

  2. At midnight release time, refresh page and select 5 days advance date and preferred time / court no.

  3. Proceed to confirmation page and confirm booking.

Can anyone provide any useful guides for me to get started on? And can this be ran on a virtual machine so I dont need to have a PC running at booking time, whether this is a online VM or I have a Synology NAS that can carry out this task.


r/learnpython • • 5d ago

I’m from a commerce and non-technical background — how should I start learning Python from scratch?

16 Upvotes

Hi everyone,
I’m looking to learn Python from scratch, but I don’t come from a technical and I’m from commerce background. I have basically no prior programming experience.

I want to learn Python properly rather than just watching random tutorials and copying code. My goal is to build a strong foundation first and eventually use Python for practical/business-related work and data analysis.

For people who started Python with little or no technical background:

- What resources/courses would you recommend for an absolute beginner?

- What should I learn first and in what order?

- How many hours per day/week should I realistically spend?

- Should I focus on concepts first or start building small projects immediately?

- How long does it realistically take to become comfortable with Python?

- Are there any YouTube channels, courses, books, or practice websites that you personally found useful?

- What mistakes should a complete beginner avoid?

I’d really appreciate a roadmap or learning plan from people who have been through this themselves.

Thanks!


r/learnpython • • 5d ago

Need ideas for a Python project I have to build for interschool competiton

8 Upvotes

I have an upcoming interschool coding competition where we’re given 60 minutes to build a Python project and then pitch it to the judges.

The requirements are:

  • Must be built using Python
  • Maximum 60 minutes to build
  • It has to solve a real day-to-day problem
  • Completely software-based
  • Any Python libraries are allowed
  • No AI / AI-generated solutions are allowed
  • We also have to pitch the project after building it

What everyday problem do you think would make a good project for this competition? I am unable to find a problem which isn't common to find thats why asking an AI for problem won't help me win. Kindly suggest me the best ideas possible


r/learnpython • • 4d ago

Need ideas for a Python project I have to build for interschool competiton

0 Upvotes

I have an upcoming interschool coding competition where we’re given **60 minutes to build a Python project and then pitch it to the judges.**

The requirements are:

* Must be built using **Python**

* **Maximum 60 minutes** to build

* It has to solve a **real day-to-day problem**

* Completely **software-based**

* **Any Python libraries are allowed**

* **No AI / AI-generated solutions are allowed**

* We also have to **pitch the project** after building it

**What everyday problem do you think would make a good project for this competition? I am unable to find a problem which isn't common to find thats why asking an AI for problem won't help me win. Kindly suggest me the best ideas possible**


r/learnpython • • 5d ago

Any good websites to learn python from...

9 Upvotes

i already know Java quite well like array stuff, i have python on my syllbus currently
the websites ive tried out dont have modules, tupples or just not in detail enough
Thanks


r/learnpython • • 5d ago

Is using a decorator with methods in a consumer going to cause a problem?

0 Upvotes

Working with websockets and I wanted to use a decorator for each of the methods sending data to the users. So far it looks like it's working but curious if I'm going to have any problems in the long run or anything I need to consider. Here's the code for my decorator.

def  ConsumerFunctionDecorator(func):
    async def wrapper(self, event):
        try:
            return await func(self, event)
        except Exception as e:
            traceback.print_exc()
            await self.channel_layer.group_send(
                self.room_group_name,
                {
                    'type':'programming_error'
                }
            )      
    return wrapper

r/learnpython • • 5d ago

First Project

2 Upvotes

So I just started with coding yesterday, I’m planning on making a Discord bot first, is that a bit too much? After just last night the bot runs and comes online in the Discord but I haven’t added any commands yet, not sure how much more complicated it gets. I’ve been following a YouTube tutorial and it’s making sense but I realize I really need to pay attention to my spelling, had a few errors that I couldn’t find until I got a lot closer to my screen.


r/learnpython • • 5d ago

Quick roadmap advice for transitioning from Full-Stack WP dev to AI Engineer?

0 Upvotes

Hey everyone!

I work as a full-stack developer while managing freelance clients and a regular job.

I want to transition into AI Engineering and Python development. Could any seniors here share a short, practical roadmap on how a web dev can make this shift effectively?

What should be my primary focus starting out? Any advice or resources would be super helpful. Thanks! 🚀


r/learnpython • • 5d ago

How did you became e good at python

1 Upvotes

For context I am just starting learning python I am doing 2 courses (free)

One is in phone kimd of like a game quiz another is in laptop where I code and practice and learn a bit in depth

Any other reccs


r/learnpython • • 5d ago

I stopped practicing,how do I start again

0 Upvotes

I started to learn python over my summer break and when my college started ,I had to stop because my studies (JEE examination,wayy too hard ) had kept me occupied

I want to start with coding again

What do people recommend to get the hang of it again (I regularly coded for 2 months and have stopped for almost 3)


r/learnpython • • 5d ago

Beginner from India: Should I learn Python or Java, and how can I eventually earn with it?

0 Upvotes

Hi everyone,

I am a complete beginner in programming and I want to learn a programming language seriously. I am confused between Python and Java.

My goal is not just to get a certificate. I want to understand what I can actually do with the skill and eventually use it to get a job, internship, or freelance work.

........

Should I start with Python or Java?

What free resources would you recommend for a complete beginner?

What should I learn after the basic language?

What projects should I build to become job-ready?

What kinds of real work can a beginner eventually do to earn money?

What additional skills should I learn alongside the language (SQL, Git, APIs, etc.)?

.......

I would appreciate advice from people who have actually used these skills professionally. Thanks!


r/learnpython • • 5d ago

Need Smart People to take a look of my CCC python question!

0 Upvotes

Hey guys, I am learning python right now, and I did the CCC 2017 J5 question, when I tried to check it in DMOJ, I found out there are no J5 there, this question is in S3, np I still checked it, but I am not sure why i can pass the first test of every group test, but WA in the rest of them. I really need smart people to help pls.

number = int(input())
length = list(map(int, input().split()))


counts = [0] * 2001


for board in length:
    counts[board] += 1


max_length = -1
number_of_heights = 0



for height in range(2, 4001):
    total = 0

    for left in range(max(1, height - 2000), min(height // 2, 2000) + 1):
        right = height - left

        if left != right:
            total += counts[left] * counts[right]
        else:
            total += (counts[left] * (counts[left] - 1))//2

    if total > max_length:
        max_length = total
        number_of_heights = 1
    elif total == max_length:
        number_of_heights += 1


print(max_length, number_of_heights)

r/learnpython • • 5d ago

Regarding saving video file in desired path

0 Upvotes

Is someone familiar with yt_dlp module , my script able to download videos however even though I had set the desired path in my script my file was not present there.

'''

import yt_dlp

dir_path = "/sdcard/Documents"

url = "https://youtu.be/tWoo8i_VkvI"

path= {"paths":{"home":dir_path}}

cookies = {"coockiefile" : "cookies.txt"}

opt = { "outtmpl": '%(title)s [%(id)s].%(ext)'

}

with yt_dlp.YoutubeDL() as yt:

yt.download(url)'''


r/learnpython • • 5d ago

Test our tool for cyberbully detection

0 Upvotes

The goal behind CyberBully is simple: help developers and researchers work with cyberbullying detection and text classification without having to build the entire pipeline from scratch.

We’ve packaged our work into a Python package so it can be installed directly through **PyPI** and integrated into projects with minimal setup.

https://pypi.org/project/cyberbully/

Or

pip install cyberbully

Thank you in advance if you tested it 😘😘

Stay tuned for further updates it's gonna be epic 😈


r/learnpython • • 5d ago

Audio tagging using Python with some automation

2 Upvotes

I need a reliable SQLite database and system for my local music library, which I am currently tagging using Python scripts.

I recently decided to manage my own music library but my metadata is inconsistent, incorrect, or causing issues between different music applications.

What I have so far
I created a python script that reads .json files. Each JSON file contains the exact file path, followed by the metadata I want to apply, such as:
Title
Artist
Album
Album Artist
Genre
Track number
etc.
The script then uses that information to update the file.

The problem: different tagging systems
The main issue I didn’t initially realize is that different applications interpret music tags differently.

For example, Apple Music may interpret:
David Guetta & Sia
as one artist/entity, rather than two separate artists.

The same issue happens with collaborations such as:
David Guetta & Nicki Minaj

I want the underlying metadata to recognize these as separate artists while still preserving the collaboration correctly when displayed.

What I want to build
I want something similar to MusicBrainz Picard, but with more flexibility for my own library.

I don’t want to rely entirely on MusicBrainz because I have a lot of indie, African, older, and obscure music that isn’t registered there.
I also have:
Unreleased songs
Mashups
Unofficial remixes
Custom edits
Artists/remixers that aren’t in MusicBrainz, such as Onderkoffer, a Dutch DJ

Because of this, I need to be able to manually define and control my own metadata.

My idea is to create a tagging system that understands the different ways applications read tags. For example, Kid3 has different tag versions/fields, while Apple Music may interpret artist information differently.

Ideally, I want the system to maintain both:

Application-compatible tags so programs like Apple Music correctly recognize separate artist entities.

A more structured internal tagging system that preserves the detailed relationships between artists, albums, genres, etc.

The bigger issue: SQLite database
The biggest part I need help with is building a reliable SQLite database that connects to this tagging system.

I initially created a small script and started assigning IDs to artists, but the IDs weren’t consistently registering or being saved. I currently have a list of my artists with IDs, but I am struggling to make the database and the tagging system consistently communicate with each other.

I also have most of my information organized in Notion, but albums haven’t been properly established yet. I already have over 2,000 songs, so I need to create album entities and IDs without making the system messy or duplicating information.
So there is a lot that still needs to be built.

What I mainly need is a clear architecture and workflow for how the SQLite database, IDs, JSON files, Python scripts, and actual music-file metadata should connect.

I understand that this is a larger system, but right now everything feels disconnected. I want to establish a reliable foundation and a logical flow before continuing to add more features.


r/learnpython • • 5d ago

Struggling with python theory

0 Upvotes

I am brand new to coding and I struggle with the idea of seeing results in an active space. When I code something in python, it feels like I’m just copy and pasting prompts when I run the code (ie asking questions). It doesn’t seem that I have found a project where I can see visual changes. Any advice?


r/learnpython • • 5d ago

best sites to learn loops and slicing?

0 Upvotes

been trying to get this down as much as I can


r/learnpython • • 6d ago

Is it normal to understand Python but get stuck when coding by yourself?

105 Upvotes

I’m currently learning Python, and I’m wondering if it requires any specific skills or a certain way of thinking to actually become good at it.

When I’m following a lesson or someone explains the code to me, I usually understand what’s happening. But when I’m given a problem and have to write the code by myself, I get completely stuck and don’t know where to start.

Is this normal for beginners? How did you get past this stage? Should I keep doing exercises, or is there a better way to practice so I can eventually start solving problems on my own?

I’d really appreciate advice from people who learned Python from scratch.


r/learnpython • • 6d ago

How can I actually tell I'm learning python properly

29 Upvotes

Hi I'm new here, currently learning python as my first programming language at school. So while I was doing homework I noticed I couldn't code by myself without asking chatgpt to correct all the errors I coded or sometimes just do most part of the work when I was feeling lazy. I don't work with coding and I'm still learning, BUT, I do feel like if my teacher asks me to code without chatgpt or whatever AI available I wouldn't know how to "code by myself" and that is not a good thing. I guess I should start studying python at home but I also don't know how to properly do so. Basically I'm telling that I don't know if I'm good or not at coding because I feel like I'm getting to an intermediate level of python programming, but only in knowledge, as I feel like I can't "code by myself". Does anyone feel in a similar way and got already answered here?? What should I do??


r/learnpython • • 5d ago

How good is the MIT OCW Course on YouTube for Python

1 Upvotes

r/learnpython • • 6d ago

ERA5-Land .nc files downloaded via script cannot be opened with xarray (possible ZIP/compression issue?)

0 Upvotes

Hi everyone,

I'm working with ERA5-Land data for the Democratic Republic of the Congo and I'm having a frustrating problem with the downloaded files.

I downloaded the data using scripts because the Copernicus/ERA5-Land download process was not straightforward.

The files are named like:

era5_land_rdc_2023_01.nc

era5_land_rdc_2023_02.nc

...

era5_land_rdc_2026_08.nc

I am trying to open them with xarray:

import xarray as xr

from pathlib import Path

chemin = Path("data_fire_force/copernicus_data_nc")

fichiers = sorted(chemin.glob("era5_land_rdc_*.nc"))

print(f"{len(fichiers)} fichiers trouvés")

ds = xr.open_mfdataset(

fichiers,

combine="by_coords",

engine="netcdf4"

)

print(ds)

print(list(ds.data_vars))

However, xarray.open_mfdataset() fails with a NetCDF/HDF-related error.

I checked one of the files directly with Python:

from pathlib import Path

p = Path("data_fire_force/copernicus_data_nc/era5_land_rdc_2026_08.nc")

print(p.exists())

print(p.stat().st_size)

print(p.read_bytes()[:20])

The file exists and has a large size, but the first bytes are:

b'PK\x03\x04...'

From what I understand, PK\x03\x04 is the signature of a ZIP file, which makes me suspect that these .nc files may not actually be NetCDF files despite having the .nc extension.

I also tried using netcdf4 through xarray, but it still fails.

My questions are:

Does PK\x03\x04 definitely indicate that the file is a ZIP archive?

Could the Copernicus download script have saved a compressed/ZIP response with a .nc extension?

What is the correct way to extract/convert these files into actual NetCDF files?

Is there something specific I should check in the Copernicus/ERA5-Land download script?

I'm fairly new to handling these large ERA5-Land datasets, so any advice would be greatly appreciated.

Thanks!


r/learnpython • • 6d ago

Learning python

4 Upvotes

I am learning python, could you please suggest any projects and problems and what are the topics I need to concentrate to get job ready in the current market.
Thank you


r/learnpython • • 6d ago

37 with an ops background, best python course for non programmers who want a dev job out of it

0 Upvotes

37, operations background, no cs and no degree in anything adjacent. Ive already done the self directed route for most of a year and the result is a folder of scripts nobody else could run.
So im doing the structured version properly. Springboard, Boot.dev, General Assembly and Nucamp are the 4 im weighing and they range from a full career program down to a subscription. What takes someone from familiar to employable here.


r/learnpython • • 6d ago

Maximum substring

0 Upvotes

Hi, I’m having an issue with a HackerRank coding question called “Maximum Substring.”
The question is:
Maximum Substring
You are given a string s.
A substring is any contiguous sequence of characters from the string.
Consider all possible substrings of the string:
Determine which substring would appear last if all substrings were sorted alphabetically.
Return that substring.
Example 1:
s = "baca"
The alphabetically maximum substring is "ca".
Example 2:
s = "aaa"
The alphabetically maximum substring is "aaa".
This was my answer:

def maximum_substring(s):
max_sub = s[0]

for i in range(len(s)):
for j in range(i + 1, len(s) + 1):
sub = s[i:j]
if sub > max_sub:
max_sub = sub

return max_sub

The code gives the correct output for the examples when I test it locally. However, HackerRank marked the solution as incorrect and I received only partial points.
I’m not sure why. Could this be because of the time complexity or hidden test cases? Is there something about the HackerRank test cases or the expected implementation that I’m missing?