Python is Google's three most advanced programming languages. Guido van Rossum, a programmer, made Python, one of the script languages. The name Python is from Guido's favorite comedy program. It's from Monty Python's Flying Circus.

 

To compare Python to C, Python codes are way shorter and more straightforward. In Python, code blocks are fundamental since the loops work with the indentations.

 

To download Python, you can download it directly from the official website.

Download Python | Python.org

You can also download Anaconda, which includes Python, Jupyter notebook, pandas, scipy, and other libraries. 

Anaconda | Anaconda Distribution

 

After downloading it, check on the command prompt by inserting Python to check if it is downloaded well. If you see this >>>, it means it is there.

You will see the libraries in Anaconda if you insert the pip list.

Check if jupyter notebook is also set up; if so, let's open jupyter. 

You will see these new pop-ups.

Click New- Python 3(ipykernel) to create a new notebook.

In this notebook, you can run the codes directly and efficiently like the one below. 

You can click the run button to run the codes or use the hotkey Ctrl + Enter or Shift + Enter.

 

Now, we will download PyCharm

If you want to download the other versions, click here: https://www.jetbrains.com/ko-kr/pycharm/download/other.html.

After downloading, to create a project, click New Project.

This pythonProject will be the name of the project that you will make. 

Run main.py to see if there is a virtual environment.  

For the basic configurations, you can set them up in the Settings menu.

To install the keymap plugins that PyCharm doesn't have, click Get more keymaps in Settings / Plugins.

I will download the Eclipse keymap.

Here in Python Interpreter, you can see the libraries list. You can easily install, uninstall, or upgrade them. 

Now, let us create a file and run it.

Here are some eclipse hotkeys that I use a lot. 

#Eclipse Keymap
# To execute : Ctrl + F11
# To Copy and Paste : Ctrl + Alt + Pg Dn
# To comment out : Ctrl + /

 

Python is a functional language, so there are many built-in Functions. The link below is about the built-in functions in Python.

Built-in Functions — Python 3.7.14 documentation

 

The syntax differs from Java, so you may need to learn the difference. 

For example, in Java, you must put a semicolon on every line when the line finishes. In Python, you do not need semicolons except for writing more than two codes in one line. 

print('Java'); print('Python')

To see the reserved list, follow this: 

import keyword
print(keyword.kwlist)

Commenting is also different. Here, we use #, ''', and """

 

In the next post, we will discuss more syntaxes and basic rules in Python.

 

 

'Python' 카테고리의 다른 글

Python) Control statements  (0) 2022.11.06
Python) Dictionary  (0) 2022.11.04
Python) Tuple / Set  (0) 2022.11.03
Python) Datatypes - Str  (0) 2022.11.03
Python) Variables and Operators  (0) 2022.10.29

+ Recent posts