Python Indentation In Hindi (Python Indentation क्या है ?)

Python

Indenting Code In Python 

indentation meaning in python

Python में Code indentation को काफी महत्व दिया गया है | Python में Code Indentation का इस्तेमाल functions, classes, Loops और control statements के लिए किया जाता है |
Python में curly braces({}) की जगह code indentation का इस्तेमाल किया जाता है | 
Python में जब code indentation में colon(:) या delimiter दिया जाता है तब automatically अगले line पर interpreter द्वारा tab( ) दिया जाता है |

indenting in python Function 

Source Code :

def func():
    a = 5
    print(a)

func()

Output :

5

For Loop - python for loop 

Source Code :

list = [1, 5, 8, 9]

for i in list:
    print(i)

Output :

1
5
8
9

Class - python class 

Source Code :

class myClass:
    def func():
        a = 5
        print(a)

myClass.func()

Output :

5


अगर आपको यह पोस्ट 📑 (Python Indenting Code In Hindi)पसंद आई हो तो अपने मित्रों के साथ जरूर शेयर करें। धन्यवाद !

Maxon

Hello there! I'm Maxon, a dedicated UI/UX designer on a mission to transform digital experiences into intuitive, user-centric journeys. With a keen eye for detail and a passion for crafting aesthetically pleasing interfaces, I strive to create designs that not only look stunning but also enhance usability and functionality.

Post a Comment

Previous Post Next Post