---
title: "Discussion on \"How to Use the Command Pattern in Python\" | Hashnode"
description: "Discussion on \"How to Use the Command Pattern in Python\". Have you ever used an undo button in an app or scheduled tasks to run later? Both of these rely on the same idea: turning actions into objects.\nThat's the command pattern. Instead of calling a method"
url: "https://hashnode.com/posts/how-to-use-the-command-pattern-in-python/69c1abb330a9b81e3aa82e36"
---

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

Discussion

# [How to Use the Command Pattern in Python](https://freecodecamp.org/news/how-to-use-the-command-pattern-in-python?utm_source=hashnode&utm_medium=feed)

Have you ever used an undo button in an app or scheduled tasks to run later? Both of these rely on the same idea: turning actions into objects. That's the command pattern. Instead of calling a method

Mar 23 · 7 min read · freecodecamp.org  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#design-patterns](https://hashnode.com/tag/design-patterns)

## Written by

[Bala Priya C](https://hashnode.com/@balapriyac)

@balapriyac · India

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

A self-taught programmer and a technical writer

I'm a self-taught programmer and a technical writer from India. I enjoy reading, writing, and coding. I share my learning with the developer community by writing beginner-friendly programming tutorials.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
