Listing 08 - Page 0: No Title

##############################################################################
# Python From Scratch
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2024
# Site: https://pythonfromscratch.com
#
# File: listing\chapter 08\08.1237 - No Title.py
# Description: No Title
##############################################################################

a = 5
def change_and_print():
    global a
    a = 7
    print(f"a inside the function: {a}")
print(f"a before changing: {a}")
change_and_print()
print(f"a after changing: {a}")
Click here to download the file