• Register
110 points

Tab size in python 

Today we will see in our website kodlogs what is the default tab size in Python programming language. According to my preference, there are 4 spaces in pycharm. Python is considered to be 8 default tab size. 

 python indentation Explain.  

We learn a lot when we are programming in Python. When we are practicing, we learn a lot. I estimated the tab size in Python with a small program if else.  If you don't give space in code block 2 by giving condition, then error appears. If you give space, error is gone. Let's share the program with you. And try to understand more default tab size.


Remember, the program uses expandtabs to control the space. If a value is given with this command, then that much space will appear. Let's see an example. Space will also come from the tab Tab / t.  ۔

Example 1

>>>T="Kodlogs "
>>>T="K\t odlogs "
K    odlogs
>>>T="K\t odlogs "
K                                  odlogs

Example 2

Tab size explain 

Print ("My self is Tania ")
If age > 20:
....Print("Wellcome jimcoder ")
....Print("Wellcome to kodlogs website ")

I hope you are understand default tab size in python. 

110 points