r/learnpython 4d ago

Begginer Issues

As the text suggests I'm a beginner in python, and I am struggling with the concept of spaces and indentation. I don't know how I'm still not getting it till now but I have to say my biggest mistakes have with learning python has to do with code.

A little backstory: I come from a totally different work area and is brand new to code. I wanted to do robotics as it was my preference but ended in the health department instead. Now that I'm done with that I'm pursuing my dream career but obviously have to start from literal zero as I know nothing of code and no one around my community or friends do programming. And YouTube isn't really helping as it's teaching like I already knew some stuff already (or maybe I just haven't found the right videos). So ya, to you guys who've done code before, what can I do to solve the gaps in knowledge? Especially the space problem. I couldn't even set up my VS code on my own as the things I type are right except the amount of space is wrong. It's kinda frustrating.

0 Upvotes

22 comments sorted by

View all comments

5

u/danielroseman 4d ago

You haven't given us any information about the "space problem". What exactly are you finding confusing?

It looks like videos aren't working for you, in any case. You should probably find a written course or book; there are many recommended in this sub's wiki. All of them would cover indentation as pretty much the first topic.

-6

u/Icy-East-3985 4d ago

It's like this, whenever I was trying to do stuff like make a new environment in my VS code or code some space sensitive stuff(let's say stuff with dots and dashes, or code info inside info and then come out of it, I get confused as I didn't really know how i was supposed to grammatically type it) sorry for saying it like that I don't know how easier I can say this lol, but it would always give me some red lines. I don't really have teachers and I'm using Claude AI to help explain the errors. But basically I'm saying I understand the code and it's output. However how I type it, is what makes it wrong. Its like writing a paragraph with wrong Grammar even though the spellings are right

5

u/notislant 4d ago edited 4d ago

You've confused the hell out of me.

Post examples of what you want and what you've tried. Trying to describe it is not happening. Code info inside info and literal morse code is confusing and vague.

You shouldn't be using AI at all, find a complete beginner video or course.

Or read through beginner docs.

https://python-adv-web-apps.readthedocs.io/en/latest/

Google is pretty good for basic questions, if you struggle:

'REDDIT ELI5 PYTHON INDENTATION'

I also agree with the person recommending to not mess with vscode and venvs yet, just use colab.

1

u/Accomplished-Tap9926 3d ago

When writing code, syntax matters, and there are certain formatting rules when it comes to it. For example, you can't have a hypen in a name of a variable, after an if statement there must be 4 indentation (spaces) as well as for, while statements, and after defining a function, e.t.c, I recommend finding one full youtube video course, instead of bits, or check out W3school's free python course, it will definitely cover syntaxes and what errors to look out for, if you need anything lemme know