Python's Syntax

Photo by Andrew Neel on Unsplash

Python's Syntax

Learn about python's syntax.

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:amena.hashnode.dev/pythons-history-basic-sy...

TAKE CARE!