Whitespace and indentation in python

Whitespace and indentation

If you’ve been working in other programming languages such as Java, C#, or C/C++, you know that these languages use semicolons (;) to separate the statements.

However, Python uses white space and indentation to construct the code structure.

By using indentation and white space to organize the code, Python code gains the following advantages:
1.) First, you’ll never miss the beginning or ending code of a block like in other programming languages such as Java or C#.
2.) Second, the coding style is essentially uniform. If you have to maintain another developer’s code, that code looks the same as yours.
3.) Third, the code is more readable and clear in comparison with other programming languages.

Python uses indentation to indicate a block of code.

See Output

At the end of each line, you don’t see any semicolon to terminate the statement. And the code uses indentation to format the code.

Python does not require semicolon(;) to terminate statements.


About Us

Comsysapp.com is an educational website. Students and software developers can learn programming language tutorials. Comsysapp is very useful for beginners and professional developers. Comsysapp provides tutorial in easy language. Comsysapp.com has focus on simplicity.

Services

Comsysapp.com provides free tutorials like c, html, css, etc. All tutorials are free for beginner and professionals.


Terms of Use

comsysapp.com is not responsible for any mistake. We are not responsible if information made available on our website is incomplete or invalid. But comsysapp.com always try for zero-zero mistake.

Privacy policy

comsysapp.com does not collect any data from users. We use Google AdSense advertising on our website. We never ask personal or private information.


Sitemap

sitemap

copyright © 2023