What are the branches in Python?
-
1 Answer
-
In Python, "branching" refers to the action of executing blocks of code based on whether certain conditions are met or not. This allows programs to take decisions and respond dynamically to various inputs or states.
Python contains only one kind of branch, the 'if' statement. If the predicate given is true, it executes a block of code and not execute it if the predicate is false.
Taking an Exam? Selecting a College?
Get authentic answers from experts, students and alumni that you won't find anywhere else
Sign Up on ShikshaOn Shiksha, get access to
- 65k Colleges
- 1.2k Exams
- 688k Reviews
- 1800k Answers