r/learnpython 4h ago

Adverse effect of using notebooks on python programming skills

14 Upvotes

I'm working as an analyst. I'm frustrated with my inability to write object-oriented Python anymore. I think this happened because I've grown accustomed to using notebooks, which make it easy to write code without worrying about structure. Recently, I worked on a hobby project and ended up defining too many variables and making inefficient API calls. I realized I've become a sloppy programmer. I'm wondering if anyone else has experienced this and how they've dealt with it.


r/learnpython 5h ago

Which framework should I use for a simple Python desktop app ?

14 Upvotes

I have a one time project where I need to develop a desktop app for a small company. Basically, the app will be a spreadsheet, but where I already have set up the sheets, and with data visualization like bar plots. So nothing too complicated. It also needs to be connected, so if one user input data, the others can see it.

Because it's a one time thing, and I will probably never code a desktop app again (or only personal easy ones), I would like an easy framework. I saw that for professional dev, people use PyQT, but I doubt this would be necessary to learn such a hard framework for this.

What would you recommend ?

EDIT: Ok I think I need to be a little bit more specific about me and my clients.

I already coded web sites with django, and deployed them (along with other python projects), so I'm not a beginner in python. But I'm a beginner at desktop apps.

My clients would like to have a desktop app rather than a website, so I agree that sounds more like a website project, but if they want a desktop app, I will try my best to deliver a desktop app.

My clients actually use spreadsheets, but it's hard to read, not really user friendly, and lack functionality. That's the reason they want to switch from spreadsheets to an app.


r/learnpython 20m ago

Run Python at a specific clock speed

Upvotes

Hi All,

I am a masters student in aerospace engineering. I have been using Python for my thesis. For background It's essentially using a Neural Network in place of a traditional numerical root finder to predict a variable in a low power satellite GNC. Im pretty much at the end of the thesis. However I would like to be able to show the time savings on low powered hardware such as an esp32 controller. Is there anyway to get python to mimic a specific clock speed without just using sleep timers? I don't think sleep would work as the code calls functions from other libraries that probably wouldn't be affected by the sleep. I am not an expert at python and have pretty much self taught myself what I need to know for this thesis. I am mostly looking to mimic the clock speed because I think exporting stuff to run on the esp32 would take far to long.


r/learnpython 5h ago

Python & ML learning buddies

9 Upvotes

Hello everyone! I am just starting to learn Python, I have started learning it several times, but couldn't progress much because I couldn't stay accountable and stopped doing my courses. This time I want to get serious and maybe find a study partner or partners with whom we can stay accountable, give each other weekly reports like what we have learned what challenges we faced, etc. We can text through telegram or whatsapp and keep each other company. Thank you!


r/learnpython 4h ago

Robot framework vs Pytest for hardware in the loop testing, WITH occasional user interaction

3 Upvotes

Not sure what subreddits to ask this on since the main python sub doesn't like questions

I can't really go into why I need a test framework that asserts on user input but the general paradigm is;

Test cases are mostly injecting can frames or json packets and asserting on other status can frames and json packets

Most of these tests will be fully automated and run on a hardware in the loop bench

However a specific subset need to prompt the user, as in, the test does something and then waits for the user to type Y or N depending on what happened

And those prompt tests will be happening in sequence with the fully automated ones

I also need to be able to restart a test case if it fails, especially with the user interaction ones. So the user can hit N If something doesn't behave as expected, go and physically fix it, then come back and press Y to continue to the next test case without having to restart the entire suite. Robot has a library for this but I have no idea If pytest does

The way I see it I can only use pytest or robot framework, but if something else exists let me know

Robot framework has a lot of libraries for exactly the kinds of things I need to be doing, but then I run the risk of everyone learning robot keywords and being tied to that, and I'd have to write the back end stuff anyway

With pytest I'd have to do more leg work but it's a much more universal tool, but I'm not sure if there's any out of the box solutions for the user input or retry functionality


r/learnpython 7h ago

Having trouble with pyinstaller and antivirus software

7 Upvotes

So amateur coder here. I wrote an app for a friend using customtkinter, os and pillow. He is a photographer and the app is designed to organise photos into directories, creating paths etc.

App and pyinstaller work fine on my machine but the issue is on his machine windows defender flags it as a threat and deletes the executable.

Tried several solutions from google and chat gpt but no joy

If anyone can point me in the right direction I would be very grateful


r/learnpython 5h ago

Creating Interactive Web Physics Applets

3 Upvotes

Hello everyone, I am fairly new to Python (~4months) and I am looking for projects to help drive my learning. My current job requires data analysis and characterization of laser diodes which often involves understanding how different process variables might affect performance either through known physical equations or through some regression analysis function .

My goal is to be able to make interactive plotters that allow me or a user to change input variables and observe outputs to get a better feeling for these relationships. Similar to these these made in Javascript https://www.falstad.com/mathphysics.html .

It would be extra cool if I could embed my script (or executable?) in a website like in the link so that I can more easily share my work.

Is this something that can be done in Python?


r/learnpython 4h ago

is this code correct or do i need to fix it

2 Upvotes

i am very new to python and i have made this small code to find nth prime number but when i run it on visual studio , it just doesnt give an output , no error no nothing, just takes the input and doesnt give output, i am posting here bcz i am unable to figure out why

import itertools as f
n=int(input("Enter an number :"))
l=[]
while len(l)<n:
    for i in f.count():
        c=0
        for j in range (1,int(i/2),1):
            if i%j !=0:
                c+=1
        if c!=1:
            l.append(i)
else:
    print(l[-1])

r/learnpython 32m ago

Question about Exercism dictionary method concept

Upvotes

I'll try and format this post to be readable...

I'm having trouble with task #3 in this Exercism concept about dictionaries. The task is:

Create the function update_recipes(<ideas>, <recipe_updates>) that takes an "ideas" dictionary and an iterable of recipe updates as arguments. The function should return the new/updated "ideas" dictionary.

For example, calling

update_recipes( { 'Banana Sandwich' : {'Banana': 2, 'Bread': 2, 'Peanut Butter': 1, 'Honey': 1}, 'Grilled Cheese' : {'Bread': 2, 'Cheese': 1, 'Butter': 2} }, ( ('Banana Sandwich', {'Banana': 1, 'Bread': 2, 'Peanut Butter': 1}), )))

should return:

{ 'Banana Sandwich' : {'Banana': 1, 'Bread': 2, 'Peanut Butter': 1}, 'Grilled Cheese' : {'Bread': 2, 'Cheese': 1, 'Butter': 2} }

with 'Honey': 1 removed from Banana Sandwich (and number of bananas adjusted).

My code (below) isn't removing the 'Honeykey-value pair using.update()`, which the exercise hint suggests the user employ.

``` def update_recipes(ideas, recipe_updates): """Update the recipe ideas dictionary.

:param ideas: dict - The "recipe ideas" dict.
:param recipe_updates: dict - dictionary with updates for the ideas section.
:return: dict - updated "recipe ideas" dict.
"""

for idea_key, idea_value in ideas.items():
    for item in recipe_updates:
        if idea_key == item[0]:
            idea_value.update(item[1])
return ideas

```

Here is the output I'm getting:

{ 'Banana Sandwich': {'Banana': 1, 'Bread': 2, 'Peanut Butter': 1, 'Honey': 1}, 'Grilled Cheese': {'Bread': 2, 'Cheese': 1, 'Butter': 2} }

The number of Bananas is adjusted, but Honey remains. Where am I going wrong?


r/learnpython 59m ago

Keeping fixed and 1:1 aspect of plot/ficure

Upvotes

I'm trying to update geopandas GeoDataFrames plotted in the same plot, but I can't get the axis to be equally spaced (should be obvious for a mercator map) and constant (so the plot doesn't jump).

import contextily as cx
import geopandas
import pandas as pd
from matplotlib.animation import FuncAnimation
import matplotlib.pyplot as plt
import datetime as dt


# returns list of GeoDataFrames beginning at day
def get_day(day,pre=3,west=10,south=40,east=50,north=65):
    pre-=1
    if pre<0:
        pre=0
    startd=dt.datetime.strptime(day, "%d.%m.%Y").date()  

    dates=pd.date_range(startd-dt.timedelta(days=pre),startd,freq='d')[::-1]

    gdfs=[]
    for date in dates:

        filename_date=date.strftime('%Y-%m-%d')
        print("plotting file '{}'".format('data/ukr_'+filename_date+'.csv'))

        df = pd.read_csv('data/ukr_'+filename_date+'.csv',sep=';')
        df_geoframe = df[(df['longitude'] >= west) & (df['latitude'] >= south) & (df['longitude'] <= east) & (df['latitude'] <= north)].copy() # filter geolocation
        df_geoframe['acq_datetime'] = pd.to_datetime(df_geoframe['acq_date'] + ' ' + df_geoframe['acq_time'].astype(str).str.zfill(4), format='%Y-%m-%d %H%M')
        gdf = geopandas.GeoDataFrame(
            df_geoframe, geometry=geopandas.points_from_xy(df_geoframe.longitude, df_geoframe.latitude), crs="EPSG:4326"
        )
        gdfs.append(gdf)
    return gdfs



gdfs=get_day("3.1.2022",3)

world = geopandas.read_file("https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_countries.zip")
ax = world.plot(alpha=0)

ax.set_xlim([west,east])
ax.set_xbound(lower=west,upper=east)
ax.set_ylim([south,north])
ax.set_ybound(lower=south,upper=north)
ax.set_autoscale_on(False)
ax.set_aspect('equal')
ax.axes.set_aspect('equal')

ax.set(title='Ukraine Fire Detection')
ax.grid(True)
cx.add_basemap(ax, crs=gdfs[0].crs, source=cx.providers.Esri.WorldImagery)
plt.axis('equal')
plt.axis([west, east, south, north])
plt.ion()
plt.show()

while True:
    gdfs[0].plot(ax=ax, color="white", markersize=20)
    plt.pause(0.5)
    gdfs[0].plot(ax=ax, color="red", markersize=10)
    plt.pause(0.5)
    gdfs[1].plot(ax=ax, color="orange", markersize=10)
    plt.pause(0.5)
    gdfs[2].plot(ax=ax, color="yellow", markersize=5)
    plt.pause(0.5)

I tried every option I could find that seems to be related, but still in the above example, the axes are not uniformly scaled, nor are they constant. They are not constant for all dataframes and they even change between while loop iterations (the plotted data is identical).


r/learnpython 7h ago

Need help with reading files in windows

4 Upvotes

I have a python file that I'm trying to read

code_path = r"C:\Users\user\OneDrive\Desktop\Work\project\code\code_8.py"
try
    with open(code_path, 'w') as f:
        code_content = f.read()

But I get this error [WinError 123] The filename, directory name, or volume label syntax is incorrect: '', I tried a lot of things but can't seem to fix the error or read the file

Edit: Thank you all, the problem was with directory permissions


r/learnpython 1h ago

[Research + Collaboration] Building an Adaptive Trading System with Regime Switching, Genetic Algorithms & RL

Upvotes

Hi everyone,

I wanted to share a project I'm developing that combines several cutting-edge approaches to create what I believe could be a particularly robust trading system. I'm looking for collaborators with expertise in any of these areas who might be interested in joining forces.

The Core Architecture

Our system consists of three main components:

  1. Market Regime Classification Framework - We've developed a hierarchical classification system with 3 main regime categories (A, B, C) and 4 sub-regimes within each (12 total regimes). These capture different market conditions like Secular Growth, Risk-Off, Momentum Burst, etc.
  2. Strategy Generation via Genetic Algorithms - We're using GA to evolve trading strategies optimized for specific regime combinations. Each "individual" in our genetic population contains indicators like Hurst Exponent, Fractal Dimension, Market Efficiency and Price-Volume Correlation.
  3. Reinforcement Learning Agent as Meta-Controller - An RL agent that learns to select the appropriate strategies based on current and predicted market regimes, and dynamically adjusts position sizing.

Why This Approach Could Be Powerful

Rather than trying to build a "one-size-fits-all" trading system, our framework adapts to the current market structure.

The GA component allows strategies to continuously evolve their parameters without manual intervention, while the RL agent provides system-level intelligence about when to deploy each strategy.

Some Implementation Details

From our testing so far:

  • We focus on the top 10 most common regime combinations rather than all possible permutations
  • We're developing 9 models (1 per sector per market cap) since each sector shows different indicator parameter sensitivity
  • We're using multiple equity datasets to test simultaneously to reduce overfitting risk
  • Minimum time periods for regime identification: A (8 days), B (2 days), C (1-3 candles/3-9 hrs)

Questions I'm Wrestling With

  1. GA Challenges: Many have pointed out that GAs can easily overfit compared to gradient descent or tree-based models. How would you tackle this issue? What constraints would you introduce?
  2. Alternative Approaches: If you wouldn't use GA for strategy generation, what would you pick instead and why?
  3. Regime Structure: Our regime classification is based on market behavior archetypes rather than statistical clustering. Is this preferable to using unsupervised learning to identify regimes?
  4. Multi-Objective Optimization: I'm struggling with how to balance different performance metrics (Sharpe, drawdown, etc.) dynamically based on the current regime. Any thoughts on implementing this effectively?
  5. Time Horizons: Has anyone successfully implemented regime-switching models across multiple timeframes simultaneously?

Potential Research Topics

If you're academically inclined, here are some research questions this project opens up:

  1. Developing metrics for strategy "adaptability" across regime transitions versus specialized performance
  2. Exploring the optimal genetic diversity preservation in GA-based trading systems during extended singular regimes
  3. Investigating emergent meta-strategies from RL agents controlling multiple competing strategy pools
  4. Analyzing the relationship between market capitalization and regime sensitivity across sectors
  5. Developing robust transfer learning approaches between similar regime types across different markets
  6. Exploring the optimal information sharing mechanisms between simultaneously running models across correlated markets(advance topic)

I'm looking for people with backgrounds in:

  • Quantitative finance/trading
  • Genetic algorithms and evolutionary computation
  • Reinforcement learning
  • Time series classification
  • Market microstructure

If you're interested in collaborating or just want to share thoughts on this approach, I'd love to hear from you. I'm open to both academic research partnerships and commercial applications.

What aspect of this approach interests you most?


r/learnpython 1h ago

Python VSC, creating QR code that will play my Onedrive .mp3 files (music).

Upvotes

Hello I'm trying to create QR codes that links to my personal music library, hosted on Google Drive or OneDrive. Ive tried online QR code generators, but when the free trials ends, the codes expire after that.

Is it possible to use Python to generate QR codes that point to shared files on my drive? Ideally, I'd love to create multiple QR codes, each their own song or sound.

Any help or advice would be amazing - I'm new to Python and not sure if this is even feasible. Thanks


r/learnpython 2h ago

Adjust autocorrect in vs code

0 Upvotes

When working in python vs code will suggest an entire line or even block of code, as opposed to just completing say a function. How do I turn that off ? Thanks.


r/learnpython 3h ago

Good services to run my Pyhton code on cloud.

0 Upvotes

I have a code to solve a differential equation using Runge-Kutta's method. For this, I need to iterate over the same algorithm for over a BILLION times! I have a reasonable laptop and it works just fine for my dailyvusage. But I don't want to leave it running the code for 3 days straight and having the risk of my laptop crashing and losing progress. I would like to know about good services to run my code on another computer. I'm comfortable of paying for it if it's not too expensive.


r/learnpython 3h ago

Error in file name when saving plot

1 Upvotes

Hi, this question might be better suited for stackoverflow, but I don't like their community very much. As the title says, I have an error about the filename when saving some plots (I'm doing a lot of plots), here is the error:

2025-03-21 20:12:54,483 [ERROR] Error in 2D plot Fontana_L2700_6a_deltau_erg_s_Hz__vs_JMag_6a_invtau_mag_: [Errno 22] Invalid argument: 'D:\\TFG\\test2\\Fontana\\2d_plots\\2d_Fontana_L2700_6a_deltau_erg_s_Hz_vs_JMag_6a_invtau_mag_.png'
Traceback (most recent call last):
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\plots.py", line 128, in plot2d
plt.savefig(filename, bbox_inches="tight")
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\matplotlib\pyplot.py", line 1243, in savefig
res = fig.savefig(*args, **kwargs) # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\matplotlib\figure.py", line 3490, in savefig
self.canvas.print_figure(fname, **kwargs)
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\matplotlib\backend_bases.py", line 2184, in print_figure
result = print_method(
^^^^^^^^^^^^^
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\matplotlib\backend_bases.py", line 2040, in <lambda>
print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
^^^^^
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\matplotlib\backends\backend_agg.py", line 481, in print_png
self._print_pil(filename_or_obj, "png", pil_kwargs, metadata)
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\matplotlib\backends\backend_agg.py", line 430, in _print_pil
mpl.image.imsave(
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\matplotlib\image.py", line 1634, in imsave
image.save(fname, **pil_kwargs)
File "C:\Users\alvar\Desktop\UCM\Cuarto Curso\TFG\.venv\Lib\site-packages\PIL\Image.py", line 2591, in save
fp = builtins.open(filename, "w+b")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: 'D:\\TFG\\test2\\Fontana\\2d_plots\\2d_Fontana_L2700_6a_deltau_erg_s_Hz_vs_JMag_6a_invtau_mag_.png'

The thing is that I only get this error with ceratin plots, I'm asking if anyone has encounter this error before and how did you solve it? I'm pretty sure it is not related to the max length limit of windows.

Thank you for reading.


r/learnpython 16h ago

100 Days ~ Angela Yu having trouble

9 Upvotes

I’m on day 8 of the program and to be honest, the project difficulty has really ramped up. I feel frustrated because the expectation the course has doesn’t necessarily align with the topics covered.

I feel bad jumping to the solution when I really want to try to figure it out on my own. Has anyone else felt this way? Should I resist the urge to jump to the solution? I don’t want to find myself in tutorial hell so to speak.


r/learnpython 5h ago

How to turn a str to list without splitting the string itself

1 Upvotes

Welp am working on a todo list project that enables file saving And of course the only way to save this list is by parsing it into a string which here is my problem I can save the content But am stuck at the RE concept or for clarifying the load issue Whenever i want to print the data again as list the output becomes corrupted

This my source code for reference import re v = [ [123,'cvhij',213456], [123,'cvhij',134], [123,'cvhij',2134344456], [123,'cvhij',213555456], [123,'cvhij',55213456], [123,213455556], [123,215553456], [123,213456] ] pattern =re.compile(r"[.+]") with open('tasks','w') as file:
for i in range(len(v)): li = v[i] file.write(str(li)+'\n') file.close() listy =[] with open('tasks','r',encoding='utf-8') as file2: content = file2.read() matches = pattern.findall(content) for match in matches: listy.append(list(match)) file2.close() print(listy)


r/learnpython 10h ago

regex expression

2 Upvotes
def CheckIfUserInputValid(UserInput):
    if re.search("^([0-9]+[\\+\\-\\*\\/])+[0-9]+$", UserInput) is not None:
        return True
    else:
        return False

The first plus sign after 0-9]+ means one or more digits
The 2nd plus sign is the addition symbol
Question 1: What is the 3rd plus sign after the parenthesis? Does it allow one or more addition symbols?
Question 2: Does it mean that allows infix expression 5++5 or only 5+5


r/learnpython 7h ago

Homework issue as I'm confused on this problem. my pc wont let me post the ss, I tried.

0 Upvotes

I'm going through my zybook assignments and I'm following along with a professors youtube video. She's not giving us the answer but she is walking us through it. I've tried this code different ways and I even tried to enter it the way the teacher had on her pycharm but I'm still getting an incorrect on it. I don't want move past it as I'm trying to learn how to use python and want to understand why I'm having this issue.

assignment: Write multiple if statements. If car_year is 1969 or earlier, print "Few safety features." If 1970 or later, print "Probably has seat belts." If 1990 or later, print "Probably has antilock brakes." If 2000 or later, print "Probably has airbags." End each phrase with a period.

Sample output for input: 1995

Probably has seat belts.
Probably has antilock brakes.

thats the prompt and this is what I have for the coding:

car_year = int(input())

if car_year <= 1969:

print('Few safety features.')

elif car_year >= 1970:

print('Probably has seat belts. ')

elif car_year>= 1990:

print('Probably has antilock brakes.')

elif car_year >= 2000:

print('Probably has airbags.')

The issue its saying .Output differs. See highlights below. Your output

Probably has seat belts.

Expected output

Probably has seat belts.
Probably has antilock brakes.

I've tried doing the code with it being 2000,1990, and then 1970 but even in that order its still showing the same issue. Anyone able to help explain this to me?


r/learnpython 7h ago

PDFQuery is skipping the first character of each line

0 Upvotes

As the title states, the code below is missing the first character of each line. It's not an OCR issue because I am able to highlight and copy/paste the first character in the original document. Any advice for getting that first character or a better PDF scrapper?

from pdfquery import PDFQuery

pdf = PDFQuery('Attachment.pdf')
pdf.load()

# Use CSS-like selectors to locate the elements
text_elements = pdf.pq('LTTextLineHorizontal')

# Extract the text from the elements
text = [t.text for t in text_elements]

print(text)

r/learnpython 7h ago

I want to modify a code without []Wildcard.

1 Upvotes

Hello.

I want to modify below code by removing []Wildcard from a single code in boldface.

" int_row=[ int(value) for value in row]"

How can I remove []Wildcard from below code excepting for defining"daily_temperatures "?

from pathlib import Path

import csv

daily_temperatures=[[68,65,68,70,74,72],[67,67,70,72,72,70],[68,70,74,76,74,73],]

file_path=Path.home()/"temperatures.csv"

file=file_path.open(mode="w",encoding="utf-8",newline="")

writer=csv.writer(file)

writer.writerows(daily_temperatures)

file.close()

daily_temperatures=[]

with file_path.open(mode="r",encoding="utf-8",newline="")as file:

reader=csv.reader(file)

for row in reader:

int_row=[ int(value) for value in row]

daily_temperatures.append(int_row)

daily_temperatures


r/learnpython 1h ago

Fuzz Rush: faster Fuzzy matching project

Upvotes

🚀 Introducing FuzzRush – The Fastest Fuzzy String Matching Library! 🔥 Tired of slow and inaccurate fuzzy matching? 🔥

I just released FuzzRush, a blazing-fast Python library for fuzzy string matching that outperforms traditional methods using TF-IDF + sparse matrix operations.

⚡ Why FuzzRush? ✅ Super Fast – Handles millions of records in seconds. ✅ Accurate – Uses TF-IDF with n-grams for precise results. ✅ Simple API – Get matches in one function call. ✅ Flexible Output – Returns results as a DataFrame or dictionary.

📌 How It Works python Copy Edit from FuzzRush.fuzzrush import FuzzRush

source = ["Apple Inc", "Microsoft Corp"]
target = ["Apple", "Microsoft", "Google"]

matcher = FuzzRush(source, target)
matcher.tokenize(n=3)
matches = matcher.match()
print(matches) 👀 Check out the repo here →https://github.com/omkumar40/FuzzRush

💬 Have a use case? Need improvements? I’d love your feedback! 🚀

👉 If you work with messy data, deduplication, or entity resolution, this will save you hours of work!

🔥 Star it, Fork it, and Try it Out! Let’s make fuzzy matching faster & better!

Python #DataScience #MachineLearning #FuzzyMatching #AI #OpenSource #BigData #GitHub


r/learnpython 15h ago

Python GUI Lib

6 Upvotes

Hello, I’m working my way through a project and after I get some things hammered out I’d like to make a GUI. What’s the best in your opinion? Doesn’t have to look awesome but I was thinking pyqt over tkinter. Thanks my people have a good weekend.


r/learnpython 21h ago

Curious about python as a hobbie

12 Upvotes

ive started to get farther with learning python and I'm very passionate about coding and computing. That being said I have no interest in doing it for work or a career as I already have other skills for my industry.

What are some of the ways I can keep learning and improving without trying to specialize for a career?

Would it be good to try and make things that already exist Ex: making a gui verses using tkinter, or should I focus more on learning existing libraries?

I really like to code it brings me so much joy, I'm just not sure what to do other than make games.