Skip to content

Commit ec7219c

Browse files
authored
Update indentation.md
1 parent 0d646ff commit ec7219c

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

Basic/indentation.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33

44
### Basic of Indentation
5-
After completion of data type and variable I hope you understand it now I am going to here to present
6-
**indentation** concepts which play a vital role in python app development
5+
**indentation** concepts which play a vital role in python app development
76

87
- One of the most distinctive features of Python is its use of indentation to mark blocks of code.
98
- Other some languages such as c and c++ uses curly braces(**{}**) to differentiate block of code
10-
- But in python we use indentation to differentiate block of code (basically tab of some active space)
11-
- we use colon as starting of code block and after words all code block will placed.
9+
- But in python, we use indentation to differentiate block of code (basically tab of some active space)
10+
- we use a colon as the starting of code block and afterwords all code block will be placed.
1211
- Leading whitespace (spaces and tabs) at the beginning of a logical line is used to compute the indentation level of the line, which in turn is used to determine the grouping of statements.
13-
- A code block (body of a function, loop etc.) starts with indentation and ends with the first unindented line.
12+
- A code block (body of a function, loop, etc.) starts with indentation and ends with the first unindented line.
1413
- The amount of indentation is up to you, but it must be consistent throughout that block.
1514

1615
### For example:
@@ -36,9 +35,8 @@ if conditions:
3635
```
3736

3837
### How can we write code block in one line
39-
- Indentation can be ignored in line continuation.
40-
- But it's a good idea to always indent. It makes the code more readable :bookmark_tabs:.
41-
38+
- Indentation can be ignored in line with continuation.
39+
- But it's a good idea to always indent. It makes the code more readable.
4240
Example:
4341
with Brackets
4442
```python
@@ -47,10 +45,10 @@ if(conditions) :#main code
4745

4846
Without Brackets
4947
```python
50-
if conditions :#Write Your Main Code Here
48+
if conditions: #Write Your Main Code Here
5149
```
5250

53-
### If you give wrong :hotsprings: indentation which error will occured
51+
### If you give the wrong indentation which error will occurred
5452

5553
Consider following code block
5654
```python

0 commit comments

Comments
 (0)