---
title: "Discussion on \"If Else Statement in Python\" | Hashnode"
description: "Discussion on \"If Else Statement in Python\". An if else statement in Python is used to execute different blocks of code based on whether a specific condition is true or false. It allows a program to respond differently to different situations or inputs. Here’s a basic structure:\npythonCopy code..."
url: "https://hashnode.com/posts/if-else-statement-in-python-1/6618e7257093059993100a51"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [If Else Statement in Python](https://techno101.hashnode.dev/if-else-statement-in-python-1?utm_source=hashnode&utm_medium=feed)

An if else statement in Python is used to execute different blocks of code based on whether a specific condition is true or false. It allows a program to respond differently to different situations or inputs. Here’s a basic structure: pythonCopy code...

Apr 12, 2024 · 1 min read · techno101.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python3](https://hashnode.com/tag/python3)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#python-projects](https://hashnode.com/tag/python-projects)

## Written by

[Anuradha Gupta](https://hashnode.com/@Techno101)

@Techno101

  
[View profile](https://hashnode.com/@Techno101)

A Tech Enthusiast

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
