Python Introduction – Part 2
Continuing from my last post on Python, taking one step forward into Python introduction.
- One of the most important factors that Developers attract towards python is its Simplicity.
- Python has the ease of using single lined expressions.
- To group several statements, Indentation serves the purpose better and is preferred instead of Braces
Declarations of variables aren’t necessary before using them.
- These were a few aspects that Developers find easy in using this language.
Get ready with Python Environment installed and Path set before starting Programming in python in your systems. If you’re unsure of installing it, follow Python Website
I explicitly use Windows for working on Python Programming language. Hence, I use windows environment to demonstrate the programs in the future.
To start the python interpreter,
- Open Command Prompt
- Type python and press Enter Key
Now you will be able to enter the python interpreter aka The Python World.
To exit out of the interpreter just use the following command.
exit() + Enter Key or
quit() + Enter Key
When you already have a python file you can run the file using:
#Python files have an extension .py
To run a command/module as a script, the following commands can be used:
python -c/-m command/module [arg]...
python -m module [arg] . . . –> uses the source file for module
To execute a package, just follow the following command:
python -m module/package_name
These are the basic things to enter and exit the python interpreter. So we can learn about other things in the next post. This python programming language is different from most other languages hence, people fluent in Python might find it difficult to accustom other languages.
I hope these python introduction posts were helpful for the beginners to understand what and why the language is so famous. Slowly we can explore the depths of the language. We appreciate your patience.