Python Course - Lesson 9 - Indentation - eXcript

Publicado em: 21 Maio 2014
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line Python Course - Lesson 9 - Indentation - eXcript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário eXcript 21 Maio 2014, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 103,998 vezes e gostou 3.9 mil espectadores. Boa visualização!