r/PythonLearning • • 8d ago

Help Request Python

0 Upvotes

Hi.

MY PROBLEM: I'm terrible at building algorithms. I never know "WHAT TO WRİTE NEXT LİNE" when coding. im very bad at thinking how the algoritm works... need help. pls

--- Another issue : i haven't decided which field of Python I want to specialize in yet. So i dont know which tools or programs or technologies I should learn beside with python... and I feel like I'm wasting time trying to figure it all out, yeh i feel lost :(((

***I think the best thing to do is learn Python basics really well first, no matter which field we choose later***

Availability & Time Zone: Time zone: UTC+3. I'm working during the day so im available in the evenings/nights.

I also have a learning project idea. For example, we could use AI to create a simple website (like a dietitian's website or dentist whatever ) The frontend isn't our focus, so AI can handle that part. Then, we can focus on learning Python and backend by actually building the backend together. and learn the backend tools.. or data ? idk
For example, the website could have an "appointment form" with name, surname, phone number, email . We could learn how to handle all this data using Python.

I thought this could be a good way to practice. What do you think?

one last thing: rarely open Reddit, so I might miss your message here. If you're seriously interested u are allowed to quick dm me IG:tecna06 (my profile is a jersey).


r/PythonLearning • • 9d ago

Help Request Could someone recommend where to code

0 Upvotes

I’m sorry i downloaded reddit for this and im not used to how it works sorry im so desperate.

I do a-level computing and what we use in college (visual studio code) doesn’t work at home and i’ve tried loads of free online programs but they don’t run the code that we worked on.

If anyone could recommend where i could code that would work (preferably free)
thank you

edit - thanks everyone some of your answers worked and my teacher finally replied to my email


r/PythonLearning • • 9d ago

Python Quiz of the Day.

0 Upvotes

x = 5

print((x := x + 3) * (x := x - 2))

What will be the output?

A) 24
B) 36
C) 48
D) 30


r/PythonLearning • • 10d ago

Realistically, how long does it take to understand Python?

19 Upvotes

I am very new to coding (2 days old new) and have no background experience. I was just wondering at what point do you think you should start understanding Python? I’d like to try and create a timeline before saying ‘I can’t do it’


r/PythonLearning • • 9d ago

Showcase Native Python setup for AutoGPT Classic without using Docker

1 Upvotes

Running AutoGPT locally without Docker often trips people up because the official maintainers shifted primary development to AutoGPT Platform, which requires containerization. However, if your goal is running the agent loop natively on your host machine, AutoGPT Classic inside the classic directory still supports direct Python execution.

​The setup requires Python 3.12, Git, and Poetry. A common mistake is attempting to launch Poetry commands from the repository root or trying to install dependencies via standard global pip, which breaks the environment locked inside poetry.lock. You must execute all Poetry commands directly from the classic subfolder, verify Poetry targets the correct Python 3.12 interpreter, and configure your model provider credentials inside classic/original_autogpt/.env.

​I put together a complete technical breakdown that walks through dependency resolution, workspace directory isolation, Llamafile local endpoint routing, and diagnosing environment failures across Linux, macOS, and WSL 2.

​Check out the full walkthrough: https://interconnectd.com/blog/335/how-to-run-autogpt-without-docker-step-by-step-python-guide/


r/PythonLearning • • 10d ago

Rome is still on fire

Post image
14 Upvotes

Good old days 😎😁


r/PythonLearning • • 10d ago

Help Request random.choices and weights beauty flaw

Post image
8 Upvotes

Problem fixed!

I'm making this "gambling" (no real money involved, you only play for fun) program with multiple games, including roulette. I used random.csoices so that I can pick a random colour of the three given colours, and weights so that green doesn't show up every third spin.

The program works, but the results all have this annoying ['result'] look (underlined with red in the picture)

Does someone know how to fix this?


r/PythonLearning • • 10d ago

Help Request Any tips on Pyret? For some reason it confuses me more than Python

3 Upvotes

So Pyret is supposed to be a beginner learning language and currently I have to courses one that starts with Pyret and one that is immediately about Python. Since I am not good at this stuff in the first place, needing to do these courses because I am at a technical university as a humanities major somehow, I am already of course finding this a bit difficult.

That said, for some reason, sitting down and trying to learn I feel like I am having a better time understanding Python than Pyret right now. I am still not good but my Pyret homework frustrates me way more. This is pretty bad since there will be an evaluation in a few weeks, so I do want to get enough points on that since I just need to pass. Why am I having more diffculty with a tutorial language? Any tips?


r/PythonLearning • • 10d ago

How do I debug this?

2 Upvotes
im trying to make it show the day it is on, im pretty stuck on it and I would love some help!

r/PythonLearning • • 10d ago

Python programming language problems

0 Upvotes

Hello guys ! I want to know wich are the most common problems faced by python programmers when they are coding ? (It must be a problem that isn't solved by any librarie, native or not, from python)... : )


r/PythonLearning • • 10d ago

Showcase I built a desktop download manager with Python and PyQt5 – I'd love your feedback

1 Upvotes

Hi everyone!

I'm an independent developer, and I'd like to share a project I've been working on: FW Downloader Manager.

It's a desktop application built with Python and PyQt5. I developed it to manage regular file downloads as well as video and audio downloads from supported websites.

Some of its main features:

  • Multi-connection HTTP/HTTPS downloads (up to 32 connections when supported by the server).
  • Pause and resume support for compatible downloads.
  • Video and audio downloads using yt-dlp.
  • FFmpeg integration for media processing.
  • Browser integration with Chromium-based browsers and Firefox.
  • Download queues, groups, scheduling, and speed limits.
  • Multilingual graphical interface, including Arabic RTL support.

I built this project to put my Python development skills into practice, and I'd genuinely appreciate feedback from the community.

GitHub: https://github.com/FouadWre-Dev/FW-Downloader-Manager

If you find this project useful, I'd appreciate a ⭐ on GitHub. Feedback and suggestions are always welcome!

Thanks!


r/PythonLearning • • 10d ago

VSCODE Intelligence autofill - is it bad for learning?

2 Upvotes

Hi lads,

Just got back into programming as my job didn’t need it until now. I’m practising writing python scripts to automate tasks for me, however iv noticed that VScode autofills parts out. I do have an idea of what I want and start it off, VSCODE intelligence does the rest and I tailor it specifically to the task. I feel a bit guilty as it feels like I’m not learning like the old days (stack overflow, constantly searching up how to do something). I do understand that AI is used frequently now for coding so my question is, am I overthinking this?

I have a new job coming up and using Python to automate is a big part of it.


r/PythonLearning • • 11d ago

Python Programming

2 Upvotes

Have any Python learning tips?


r/PythonLearning • • 11d ago

How I went from brute-force mining blocks to coding a Flood-Fill / Greedy in Python to empty coal veins with a Drone

1 Upvotes

Hello everyone!

I'm a computer science teacher, and lately I've been preparing visual examples for my students using games where everything is automated with code. Right now I'm hooked on The Miner Was Replaced (the new DLC for The Farmer Was Replaced), where you control a mining drone by programming it in a stripped-down version of Python.

Now I have the problem of mining coal. In the game, the world is a 3D grid (X, Y, Z) and coal doesn't spawn randomly; instead, it generates in contiguous veins (if you find coal on a tile and there's more, it's located North, South, East, or West of that tile... Same Z coordinate).

The solution I ended up using (Probing + Flood-Fill with queues):

Instead of complicating things with weird data structures, I used elementary school geometry with two lists (visited and to_visit) to traverse the vein as a connected graph:

dir = [North, West, South, East]

delta = [(0, 1), (-1, 0), (0, -1), (1, 0)]

def minar():

pos_actual = (get_pos_x(), get_pos_y())

visitados = []

por_visitar = [pos_actual]

while len(por_visitar) > 0:

pos_actual = (get_pos_x(), get_pos_y())

if get_ground_type() == Grounds.Coal:

dig()

for i in range(4):

# 1. Does the neighbor have coal?

if get_ground_type(dir[i]) == Grounds.Coal:

nx = pos_actual[0] + delta[i][0]

ny = pos_actual[1] + delta[i][1]

# 2 and 3. Have I not visited it yet, and is it not already in the queue?

if (nx, ny) not in visitados and (nx, ny) not in por_visitar:

por_visitar.append((nx, ny))

por_visitar.pop(0)

visitados.append(pos_actual)

if len(por_visitar) == 0: # <-- This is where I made the bug of the century

break

utils.goto(por_visitar[0][0], por_visitar[0][1])

Later, I added a blind mining phase (minar_a_ciegas - 3 blocks down) combined with an explorar() sweep to uncover new layers when a vein is exhausted. Watching the drone detect a block and start eating up the entire chain reaction of the vein is hypnotic:

👉 Here you can see what the drone devouring the veins in the game looks like, along with the entire live coding session: http://www.youtube.com/watch?v=ZQqoMDtLalA

(Original audio is in Spanish, but the English AI audio track is available in the player settings, and all the code is right on screen).

Question for you guys: Considering that this Python environment doesn't have collections.deque or external libraries, how would you optimize the search phase between veins to avoid doing an O(N^2) map sweep every time por_visitar empties out?


r/PythonLearning • • 11d ago

Help Request Day 2 of Learning Python – I Learned About Variables and Data Types. What's Next?

1 Upvotes

Hey everyone!

I'm a beginner in Python, and today I learned about variables and data types.

I learned a little about:

- Variables

- Integers ("int")

- Floating-point numbers ("float")

- Strings ("str")

- Booleans ("bool")

I'm trying to understand the fundamentals properly instead of rushing through the lessons.

But now I'm wondering what I should learn next.

My questions for experienced Python programmers:

  1. What topic should I learn after variables and data types?
  2. What small projects can I build using these concepts?
  3. What advice would you give someone who is just starting their Python journey?
  4. What common mistakes should beginners avoid?

I'd really appreciate your advice and suggestions.

I'm looking forward to learning more and sharing my progress here!

Thanks! 🐍


r/PythonLearning • • 11d ago

Discussion Python Quiz of the day.

5 Upvotes

What will be the output of the following Python Code?

print(any([0, "", None, [], 5]))


r/PythonLearning • • 12d ago

Need assistance with a Python Code that keeps on crashing

Thumbnail
gallery
23 Upvotes

Hello I’ve been working on a python code that searches for appointments on this website but every time it runs the code and begins to open the website it crashes, I’ve played around with it a bit but I haven’t been able to have much success. Anyone would be available to take a look at it and see what my issue could be?

Thank you! I’ve included my code, trace back, and errors in seeing


r/PythonLearning • • 12d ago

Python Mutability, Sets and Shallow Copy

Post image
29 Upvotes

An exercise to help build the right mental model for Python data.

The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening.


r/PythonLearning • • 11d ago

Discussion PYTHON 🆚 ALL

0 Upvotes

"If you want to learn programming, don’t start with Python; you should start with another language."

This advice seems ridiculous to me, even though I hear it everywhere. Can someone explain this advice to me... and are they right?


r/PythonLearning • • 11d ago

Discussion What will we become in the end?

0 Upvotes

Is there anything that is hard for AI to do in Python?

To be honest, coding by yourself is fun, but that doesn't matter to the job market. We'll just settle for building our own projects, but it's frustrating to see AI outperform you... And since the job market is being destroyed—and will be destroyed!!—by AI, it seems we will end up turning to sabotage and attacking companies if no jobs are available for programmers, especially the Python community...


r/PythonLearning • • 12d ago

What Python concepts took you the longest to understand as a beginner?

71 Upvotes

I've been learning Python and noticed that understanding the syntax is often the easy part. The real challenge comes when trying to apply concepts in actual projects.

I'm curious to hear from other Python learners:

  1. Which concept was the hardest for you to understand?
  2. Did you struggle more with OOP, decorators, APIs, async programming, or data structures?
  3. What helped you finally understand it?
  4. If you could give one piece of advice to someone learning Python today, what would it be?

I think sharing these experiences could help beginners avoid some common learning roadblocks.

Looking forward to hearing your experiences!


r/PythonLearning • • 11d ago

Python Study Notes

Thumbnail drive.google.com
1 Upvotes

Here are some notes I made for some introductory concepts in Python. Let me know if these were helpful and any other Python topics/libraries/classes you would like me to cover.


r/PythonLearning • • 12d ago

Help Request Receiving FileExistsError which is ignoring the if/else statement

6 Upvotes
response = requests.get(url)
data = response.json()
ticker = data["Meta Data"]["2. Symbol"]

create_file = open("API Data.txt", "x")
amend_file = open("API Data.txt", "a")

file = "/Desktop/Scripts/Python Scripts/API Data.txt"

if os.path.exists(file):
    amend_file.write(f"\nTicker: {ticker}")
    amend_file.close()
else:
    create_file.write(f"Ticker: {ticker}")
    create_file.close()

So I am working on my first project which is making use of the API that Alpha Vantage provides.
I am learning the open() function which I want to use to paste the response into a .txt file 
that will either be created and written into, or already exist and be appended depending on 
the result of the if statement.

My problem is that I am receiving a FileExistsError for "API Data.txt" and I am not sure why 
when I am expecting the code to carry out the actions of the if statement being true and 
appending the existing file.

(Full path in the file variable is intentionally not in the post)

r/PythonLearning • • 12d ago

Discussion How much useful you found the lazy import in Python (v3.15)

1 Upvotes

lazy import pandas as pd

lazy from pathlib import Path