Lesson 2 Your First Python Program

To write Python code, you can use any editor that can edit text , such as your notebook, notepad++, or use other tool platforms, such as vscode, pycharm, etc. The picture below is vscode. By default, python files use UTF-8 character encoding , and the Python program extension is .py

The following is the entry code for Python, is it very simple?

#入门程序
"""
没问题,多行注释
"""
print('hello world!')

Let's take a look at the results of the operation:

Printed hello world, that's pretty simple.

print is the printing function in python, you can try it yourself.

#Beginning is the line comment of python

"""

No problem, multi-line comments

"""

Inside is the multi-line comment of Python.

Guess you like

Origin blog.csdn.net/xipengbozai/article/details/129774807