# Getting started with python

**URL:** <https://discuss.python.org/t/getting-started-with-python/80074>\
**Category:** Python Help\
**Created:** [February 9, 2025, 4:38pm UTC](https://discuss.python.org/t/getting-started-with-python/80074 "2025-02-09T16:38:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 9, 2025, 4:38pm UTC](https://discuss.python.org/t/getting-started-with-python/80074/1 "2025-02-09T16:38:35Z")

</div>

Hello everyone, [first post] I already have (very) good knowledge in programming (mysql, php, html,cs) and I would like to learn python, but I don’t know where to start to acquire good knowledge quickly enough, thank you for your comments and recommendations! 🙂  
Guillaume.

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 9, 2025, 4:39pm UTC](https://discuss.python.org/t/getting-started-with-python/80074/2 "2025-02-09T16:39:20Z")

</div>

javascript and css, also, yes… 🙂

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 9, 2025, 4:41pm UTC](https://discuss.python.org/t/getting-started-with-python/80074/3 "2025-02-09T16:41:57Z")

</div>

well, I have already installed python and executed a script, so far, everything is fine!

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 10:28am UTC](https://discuss.python.org/t/getting-started-with-python/80074/4 "2025-02-10T10:28:37Z")

</div>

Hello everyone, I tried to pause my simple code, like found on the internet, but it doesn’t work, stupid question from a newbie sorry for that but I couldn’t find good answers to that. ☹

the formatting code (if it’s ok ? ) =\>

```python

import os

os.system("pause")

```

Thank you for your enlightenment!

Guillaume.

---

<div class="post-metadata">

**Author:** ![abessman](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abessman/32/8367_2.png) [@abessman](https://discuss.python.org/u/abessman)\
**Post date:** [February 10, 2025, 10:36am UTC](https://discuss.python.org/t/getting-started-with-python/80074/5 "2025-02-10T10:36:55Z")

</div>

> [@guibs63](#):
>
> it doesn’t work

In what sense does it not work? What are you trying to do?

> [@guibs63](#):
>
> ```python
> import os
> 
> os.system("pause")
> 
> ```

What did you expect would happen when you ran this? What happened instead?

---

<div class="post-metadata">

**Author:** ![peterc](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@peterc](https://discuss.python.org/u/peterc)\
**Post date:** [February 10, 2025, 10:41am UTC](https://discuss.python.org/t/getting-started-with-python/80074/6 "2025-02-10T10:41:04Z")

</div>

if you want your program to run in a shell and pause until the user presses enter, I believe the best way to achieve that is `input("")`.

`os` is a bit finicky, and I would avoid it if possible. (It’s usually possible.)

To answer your question of why it’s not working, we’d need to know your IDE, operating system, etc. The code looks fine.

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 10:42am UTC](https://discuss.python.org/t/getting-started-with-python/80074/7 "2025-02-10T10:42:26Z")

</div>

Hello Alexander, thanks for trying to help !  
whell, the The window closes immediately this is my code =\>

```python

fruits = ["apple", "banana", "cherry"]

for x in fruits:

print(x)

import os

os.system("pause")
where is my mistake please ?
Guillaume.

```

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 10:51am UTC](https://discuss.python.org/t/getting-started-with-python/80074/8 "2025-02-10T10:51:12Z")

</div>

Hello Peter, my IDE is unless I’m mistaken? " Visual Code " and my OS =\> windows 11…

and I try to familiarize myself with a simple loop to improve myself little by little.

---

<div class="post-metadata">

**Author:** ![abessman](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abessman/32/8367_2.png) [@abessman](https://discuss.python.org/u/abessman)\
**Post date:** [February 10, 2025, 10:54am UTC](https://discuss.python.org/t/getting-started-with-python/80074/9 "2025-02-10T10:54:18Z")

</div>

> [@guibs63](#):
>
> The window closes immediately

How are you running this script? Usually, python scripts like this are run from within an IDE.

If you are running the script by double-clicking on it, python probably runs into a problem in your script and prints an error message, which you never see because the process finishes and the associated window closes.

If the code is actually what you posted:

> [@guibs63](#):
>
> ```python
> fruits = ["apple", "banana", "cherry"]
> 
> for x in fruits:
> 
> print(x)
> 
> import os
> 
> os.system("pause")
> 
> ```

the error is `IndentationError`. `print(x)` needs to be indented relative to the `for` loop.

When developing python, you should work in an IDE, or at the very least run your code from the command line.

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 10:54am UTC](https://discuss.python.org/t/getting-started-with-python/80074/10 "2025-02-10T10:54:36Z")

</div>

and I try it in a shell, yes…

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 10:59am UTC](https://discuss.python.org/t/getting-started-with-python/80074/11 "2025-02-10T10:59:11Z")

</div>

well I use Visual Code and I try to run it in a shell. Can you please post me the example of the correct script please ?

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 11:00am UTC](https://discuss.python.org/t/getting-started-with-python/80074/12 "2025-02-10T11:00:11Z")

</div>

By the way, I’m French (I use Google Translate, even if I have a pretty good level in English)

---

<div class="post-metadata">

**Author:** ![abessman](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abessman/32/8367_2.png) [@abessman](https://discuss.python.org/u/abessman)\
**Post date:** [February 10, 2025, 11:02am UTC](https://discuss.python.org/t/getting-started-with-python/80074/13 "2025-02-10T11:02:51Z")

</div>

Like I said, if you indent the `print` statement the script is valid:

```python
fruits = ["apple", "banana", "cherry"]

for x in fruits:
    print(x)

import os

os.system("pause")

```

Keep in mind that this will only run on windows, since `pause` is a windows-specific command. If you just want the script to pause for user input at that point, it is better to use the python function `input("")`, like peterc said above.

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 11:12am UTC](https://discuss.python.org/t/getting-started-with-python/80074/14 "2025-02-10T11:12:30Z")

</div>

Thank you! This time it works properly! I imagine that anointing python input(“”) is a “native” function, stay tuned, next step =\> functions! Maybe? Or if you have any other recommendations?  
Guillaume.

---

<div class="post-metadata">

**Author:** ![abessman](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/abessman/32/8367_2.png) [@abessman](https://discuss.python.org/u/abessman)\
**Post date:** [February 10, 2025, 11:17am UTC](https://discuss.python.org/t/getting-started-with-python/80074/15 "2025-02-10T11:17:40Z")

</div>

I recommend you go through the official python tutorial: [Le tutoriel Python — Documentation Python 3.13.2](https://docs.python.org/fr/3.13/tutorial/index.html)

It’s available in French and covers the basics of the language, as well as some more advanced topics. It’s really quite good.

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 11:21am UTC](https://discuss.python.org/t/getting-started-with-python/80074/16 "2025-02-10T11:21:38Z")

</div>

So cool to help, thank you!

Of course, thank you Alexander, I’ll follow your advice! 😉

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 11:29am UTC](https://discuss.python.org/t/getting-started-with-python/80074/17 "2025-02-10T11:29:59Z")

</div>

The tutorial seems to be very complete indeed, it will keep me busy in terms of reading, thank you again! 🙂

---

<div class="post-metadata">

**Author:** ![peterc](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@peterc](https://discuss.python.org/u/peterc)\
**Post date:** [February 10, 2025, 12:46pm UTC](https://discuss.python.org/t/getting-started-with-python/80074/18 "2025-02-10T12:46:39Z")

</div>

I still remember writing my first scripts in mousepad, and running them from the terminal. It’s valuable experience I think.

At the same time I agree it’s easier in an IDE. Visual Studio Code is good.

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 1:59pm UTC](https://discuss.python.org/t/getting-started-with-python/80074/19 "2025-02-10T13:59:13Z")

</div>

my first scripts were written with notepad, not even notepad++! 🙂 that’s a long time ago lol! 😛

---

<div class="post-metadata">

**Author:** ![guibs63](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guibs63/32/25793_2.png) [@guibs63](https://discuss.python.org/u/guibs63)\
**Post date:** [February 10, 2025, 2:04pm UTC](https://discuss.python.org/t/getting-started-with-python/80074/20 "2025-02-10T14:04:18Z")

</div>

il y zvait déjà jquery there was already jquery and other cool stuff! 🙂 )  
short break, see you later, 😉  
time

[Next page](https://discuss.python.org/t/getting-started-with-python/80074.md?page=2)
