Python syntax can be executed by writing directly in the Command Line, or by creating a python file on the server, using the .py file extension, and running it in the Command Line.
pythoncommand (active python language / Enter the python language)
print("Hello, World")this code
#Hello world!For comments and
input("any key to exit...")use for hold the screen after executing the program) :
Note : Here we use
input() function just for hold the screen after executing the program.
In python language ( # ) sing use for comments, all characters after the # and up to the end of the physical line are part of the comment and the Python interpreter ignores them.
Note : We use
print() function for showing some texts/values and
exit() function use for exit from the python.
Python also has extended documentation capability, called docstrings. Docstrings can be one line, or multiline. Following triple-quoted string is also ignored by Python interpreter and can be used as a multiline comments.
The semicolon ( ; ) allows multiple statements on the single line given that neither statement starts a new code block. Here is a sample snip using the semicolon :
name = 'AyaN'; age='24'; print("My name is: " + name + "\n" + "My age is: " + age); input();
\n is help you create a new line.
Currently we improved our website User Interface and other contents. Our next update is adding video tutorials on this site so, We create a new YouTube channel, our YouTube channel name is CodeX.
We need some time for make video tutorials (CodeX) so, stay with us and keep supporting and you know already we make a Collaboration with HackIsOn YouTube channel long time ago So, please Subscribe Our Channels