Ternary Operator or Short Hand If Else in Python | [Part 23] Python Tutorial for Beginners in Hindi

Опубликовано: 13 Июль 2023
на канале: Tech Gun
1,365
25

#python #tutorial #hindi #programming

Python tutorial for Beginners in Hindi

In this video you will learn about Ternary Operator or Short Hand If Else in Python.

In Python, logical operators carry out logical operations and return Boolean values based on the result. We need to verify multiple conditions simultaneously or use logical operators by combining multiple conditions in some cases. There are three types of logical operators in Python:

1. And Operator
2. Or Operator
3. Not Operator

And Operator

The And operator is used to verify where both conditions associated with it are True Simultaneously. It is represented as "X and Y".

Or Operator

The Or Operator is used to verify that either of the associated conditions is true. It is represented as "X or Y".

Not Operator

The Not Operator is associated with a single condition. It inverts the results, i.e., true is changed to false, and false is changed to true. It is represented as "not X".


The ternary conditional operator is a short-hand method for writing an if/else statement. There are three components to the ternary operator: the expression/condition, the positive value, and the negative value. When the expression evaluates to true, the positive value is used—otherwise the negative value is used.


Source Code: https://github.com/TechGun/Python-Tut...

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

Why to Learn Python?
Python is consistently rated as one of the world's most popular programming languages. Python is fairly easy to learn, so if you are starting to learn any programming language then Python could be your great choice. Today various Schools, Colleges and Universities are teaching Python as their primary programming language. There are many other good reasons which makes Python as the top choice of any programmer:

1. Python is Open Source which means its available free of cost.
2. Python is simple and so easy to learn
3. Python is versatile and can be used to create many different things.
4. Python has powerful development libraries include AI, ML etc.
5. Python is much in demand and ensures high salary

Link for Complete python Tutorial in Hindi for Beginners:    • JavaScript Tutorial in Hindi  

Other Important tutorial
------------------------------
HTML Tutorial:    • HTML Tutorial for Beginners | HTML Fu...  
CSS Tutorial:    • CSS Tutorial for Beginners One Shot |...  
Javascript Tutorial:    • JavaScript Tutorial for Beginners | J...  
Tips for Developer:    • 🎯Tips and Tools for Front-end Web Dev...  
HTML and CSS Project:    • How to make a website using HTML and ...  
Bootstrap Tutorial:    • Bootstrap Tutorial for Beginners to A...  
React js Tutorial:    • React JS Tutorial in Hindi | React Tu...  
Hosting Website:    • How to Host a Website | Hosting Tutor...  
Photoshop Tutorial:    • Video  

Please subscribe to watch more videos like this:    / @techgun  #Tutorial#Hindi#programming


Смотрите видео Ternary Operator or Short Hand If Else in Python | [Part 23] Python Tutorial for Beginners in Hindi онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Tech Gun 13 Июль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,36 раз и оно понравилось 2 людям.