Python Course - Lesson 9 - Indentation - eXcript

Publié le: 21 mai 2014
sur la chaîne: eXcript
103,998
3.9k

#python #programming #eXcript

What is indentation? Indentation is the name given to the spacing of text from its margin. The word indentation comes from the English "indentation" and its use is normal in the source code of a program, regardless of the language used.

======================
COMPLETE PYTON COURSE - Basic to Advanced
Development of Commercial Applications with Python for Android, iOS, Win, Linux and Mac
https://www.udemy.com/course/curso-de...
======================

In Python, indentation plays a very special role, because a block of instructions is delimited through the use of indentation. Thus, we group code that must be executed in the same order, based on the number of spaces used from the margin to the beginning of the code.

It's common to use 2 spaces or 4 spaces. Therefore, the first level is level 0, meaning the level with no spacing. The second level would be the level with 2 or 4 spaces, the third with 4 or 8 spaces.

We can also use a tab. Thus, the first level would be level 0, meaning no spacing. The second level would be the one with a single tab, the third level the one with 2 tabs, and so on.

So, the most important thing to know is that in Python, spacing is not optional; that is, we don't add it if we want, but rather, we are obliged to use it.

The benefits of using tabs are quickly apparent because Python code will always be organized; otherwise, it won't work. And not only that, our code becomes more readable when structured in a standard way, as Python requires us to work with.

---

Kivy Course (COUPON): https://www.udemy.com/course/curso-de...
Demo Video:    • 🔴 Desenvolvimento de Aplicações Comerciais...  

Supporting Material: http://excript.com.br/python/como-ins...
ALL Lessons:    • Curso de Python  

Excript WEBSITE: http://excript.com.br/
FB:   / excript  
Twitter:   / excriptbrasil  
MY PUBLIC PROFILE: https://goo.gl/4SPRVf

CONTACT: excriptbrasil@gmail.com


Sur cette page du site, vous pouvez voir la vidéo en ligne Python Course - Lesson 9 - Indentation - eXcript durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur eXcript 21 mai 2014, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 103,998 fois et il a aimé 3.9 mille téléspectateurs. Bon visionnage!