---
title: "Discussion on \"Mastering Python: Day 4\" | Hashnode"
description: "Discussion on \"Mastering Python: Day 4\". python global variable\nIn Python, a global variable is a variable that is defined outside of a function and is accessible from within any function. Here's an example:\nVerifyOpen In EditorEditCopy code1x = 5  # global variable\n2\n3def my_function():\n4 ..."
url: "https://hashnode.com/posts/mastering-python-day-4/66cea0f92c69a8e328b13ba0"
---

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

Discussion

# [Mastering Python: Day 4](https://yogesheon.hashnode.dev/mastering-python-day-4?utm_source=hashnode&utm_medium=feed)

python global variable In Python, a global variable is a variable that is defined outside of a function and is accessible from within any function. Here's an example: VerifyOpen In EditorEditCopy code1x = 5 # global variable 2 3def my\_function(): 4 ...

Aug 28, 2024 · 3 min read · yogesheon.hashnode.dev  
Read the article

-   [#python-projects](https://hashnode.com/tag/python-projects)
-   [#python](https://hashnode.com/tag/python)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#devops](https://hashnode.com/tag/devops)

## Written by

[Yogesh Rajput](https://hashnode.com/@yohini)

@yohini

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

Beat The Best!

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
