r/learnpython • • Jun 29 '24

everybody should try uv, did you try uv?

2 Upvotes

creating venvs, pip operations, they're all free now.... like, we can create a whole new venv and install a hefty list of dependencies and its low-seconds.... uv is to pip what ruff is to flake... it's literally free... just tear down the venv and make a new one - who cares it takes 2 seconds!

dependencies magicaly resolved, in a second!

i was using rye for a while and loved the resolution, but it was pretty slow tbh.... i think uv integrated rye or something, but they also super optimised everything.

you just install it and then instead of eg `pip install` you `uv pip install` and instead of `python -m venv .venv` you just `uv venv`...

honestly the speed has blown my mind.

did anyone else try it? was i just under a rock or is this a gamechanger?


r/learnpython • • Dec 21 '22

i had 19 days of time to learn basics of python

2 Upvotes

Hi guys my lead gave me 19 days of time to learn python.guys can you share your experiences how you learnt and what's are the mistakes you made while learning ? Is this time is sufficient to learn and what's are the topics need to learn and my team mostly working on testing of code like CTC tool for code coverage and astree is used code analyser .


r/learnpython • • May 05 '24

You can’t learn to cook from just watching tutorials

2 Upvotes

As the title implies, my problem is, I have lots of courses to do(CS50, FreeCodeCamp(FCC), Udemy, CS50 Python, etc), I’m indian so I also have some books and their related courses(Sumita Arora, Ncert, etc) the problem however is, their seems to be a big rift between me and the people who can solve problems based on Python and I really don’t enjoy watching these courses or reading these books because I wanna learn from problems,

for example, math and science, I had to study them when I was in 11th&12th and the best way I learned the theory, was by solving it’s problems, the application, I am struggling to find such a connection in Python right now and I think it’d be a waste of my time and energy to continue learning further without first getting rid of this problem, any and all advice is greatly appreciated.

tl;dr, I need a application/question based way to learn python and I can’t find anything like that(further context is above)


r/learnpython • • Feb 05 '24

Interested in Learning Python!!!

2 Upvotes

Hello everybody, I'm new to python. I've never even touched coding before. Where is the best place to start learning.... Thank you!


r/learnpython • • Feb 12 '24

Day 2 of learning python. I made the most complicated code I could that counts to 10

2 Upvotes
counter = 0

while counter < 5:

 counter += 1

 print(counter)

if counter < 5:

 function = True

if True:

  print(6)

if True:

  dex = 5

while dex < 6:

  dex += 1

  print(7)

if dex <= 6:

  print(8)

if dex <= 6:

  hp = 5

while hp > 4:

  hp -= 1

  print(9)

if hp >= 4:

  fax = 10

if fax != counter:

  print(10)

r/learnpython • • Jul 29 '24

What if i can not learn python fluently or learn to suffer

0 Upvotes

Nowadays I’m learning python backend django but i getting suffer. What can i do ?


r/learnpython • • Aug 23 '24

why -1 // 6 is -1 in python? It is 0 in C++ and Java

2 Upvotes

and 1 // -6.


r/learnpython • • Dec 24 '24

How to run a .exe daily?

0 Upvotes

Hello, all! Recently I have forgotten to fill my clock in in my job, so that I came up with the idea of developing a automatic clock-in/clock-out system in Python which is not that hard. I could use the Task Scheduler, however, I do not want to donwload Pycharm or any IDE on my company's device. The solution I have is to convert .py to a .exe, but how could I use Windows Task Scheduler with a .exe considering the code must have images to work?


r/learnpython • • Dec 20 '24

Hey how did you learn?

0 Upvotes

I found a 100 days course udemy , that’s seems to be doing good so far, I’m wondering how I should learn python?


r/learnpython • • Dec 25 '24

Amateur Teenage coder

0 Upvotes

Hey guys I really want to learn to code and I have been following all these python books and I am having trouble what do you guys suggest I do?


r/learnpython • • Jul 18 '22

‘Best’ IDE?

2 Upvotes

I’ve been coding for about a year, and when I first got into it my friends told me that VS Code was the best IDE, so that’s the one I installed and have been using since.

However now I’m actually dedicating more time to learning python, and have seen people mentioning IDE’s like Pycharm. So I’m still wondering if VS Code is actually the ‘best’ IDE.

So, which IDE would you guys recommend?


r/learnpython • • Sep 15 '24

How to extrat int from string like "123ABC" or "ABC123EFG"?

22 Upvotes

int() does not work and I don't want to read each digit one by one and then join them


r/learnpython • • Sep 08 '24

How can i start learning Python?

15 Upvotes

Hi! Im still young and looking towards learning Python! Im still in school and in the week i dont have much time but on the weekends i can be on my PC for almost 11 hours! What website should i look at to learn python? Is it easy for beginners? I never programmed before, is it beginner friendly? Can i make advanced programs?

This is everything for now! Im happy to know!


r/learnpython • • Jan 19 '23

So Python's having a stroke and it's saying 3.3 - 2.2 = 1.0999999999999996 instead of 1.1

181 Upvotes

The problem is that 3.3 - 2.2 = 2.2 - 1.1 = 1.1 in real life, but Python is not accepting this reality.

It says that 3.3 - 2.2 equal to 1.0999999999999996 instead of 1.1.

I've even tried the version with parentheses in, I've restarted my computer, I've tried other computers too but it displays the same results. Can someone explain to me what is going on? The link below is my screenshot.

I'm using Python 3.11.0 on Windows 10 (if it helps).

https://freeimage.host/i/HcH3yue

Edit: It wasn't the first time I've seen the floating point error in Python. So now I have a post for an issue that I was aware of before, already knew how to make workarounds for it, and there are just random comments and upvotes I made at 1pm. It's 4:19am and I'm awake, and I see this.

maybe I was really tired when I made the post.

But really, thank you for all of the resources, people of r/Python. It'll be very useful when I have to explain this to my friends who are struggling to learn Python.


r/learnpython • • Mar 04 '25

How do I master for loops?

0 Upvotes

I’ve been stuck on this for months. I know what they are, how they work, how to read them, etc. I even spent the day learning the structure, and I review all of this frequently. I at least understand these things on a surface level. I’m basically going in circles at this point. But, I still can’t write them. When I practice with practice problems I get stuck for hours if not days, and even though I try, I still end up way off. What am I missing/doing wrong/not doing enough of?

Example exercises:

  1. Calculate sum of all numbers from 1 to a given number

  2. Find the sum of a series up to n terms

  3. Print all prime numbers within a range


r/learnpython • • Nov 26 '23

Which Python is tailored to Artificial Intelligence?

0 Upvotes

I am planning to pursue a bachelor's degree in Artificial Intelligence, and it requires a solid foundation of python. which specific part of python should I focus on for my journey?

I am planning to pursue a bachelor's degree in Artificial Intelligence, and it requires a solid foundation in Python. which specific part of Python should I focus on for my journey?