Skip to main content

Command Palette

Search for a command to run...

Python's Syntax

Learn about python's syntax.

Published
•1 min read•View as Markdown
Python's Syntax
M

python, selenium python, HTML, java, CSS, editing, learning, developing, designing, writing, making, and growing yes I am a Leo girl!

INTRODUCTION:

Hey Folks, How you doin'? HOPE u all are doing well! so I am back with another python blog Enjoy!!!

download (1).jfif

Execution: So, Python syntax can be executed by writing directly in the Command Line.

Example:

print("Hello, World!") Hello, World!

Or we can also create a python file on the server, using the .py file extension, and running it in the Command Line.

Example:

C:\Users\Your Name>python myfile.py

Python Indentation:

Indentation refers to the spaces at the beginning of a code line. In Python the indentation is very important.

images (1).jfif

Python Variables:

In Python, variables are created when you assign a value to them.

Example:

x = 5 y = "Hello World!" in this example x and y both are variables.

We will discuss Python Variables later!

images.jfif

Comment: You can also type comments in python. Comments start with a # and Python will render the rest of the line as a comment.

Key Point: close ur content in Quotes (commas).

Do check out my friend's blog's link:https://amena.hashnode.dev/pythons-history-basic-syntax-and-if-else-elif-statements.

TAKE CARE!