---
title: "Discussion on \"Day 33 - Short Hand if else\" | Hashnode"
description: "Discussion on \"Day 33 - Short Hand if else\". If ... Else in One Line\nThere is also a shorthand syntax for the if-else statement that can be used when the condition being tested is simple and the code blocks to be executed are short. Here's an example:\na = 2\nb = 330\nprint(\"A\") if a > b else prin..."
url: "https://hashnode.com/posts/day-33-short-hand-if-else/6444c00cd8065a2a68c22745"
---

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

Discussion

# [Day 33 - Short Hand if else](https://viveky.hashnode.dev/day-33-short-hand-if-else?utm_source=hashnode&utm_medium=feed)

If ... Else in One Line There is also a shorthand syntax for the if-else statement that can be used when the condition being tested is simple and the code blocks to be executed are short. Here's an example: a = 2 b = 330 print("A") if a > b else prin...

Apr 23, 2023 · 1 min read · viveky.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)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Vivek Yadav](https://hashnode.com/@vivek166)

@vivek166 · Noida, India

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

Web Developer

I'm a Frontend Developer, passionate about learning about new Web Technologies.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
