Click here to Skip to main content
15,887,214 members
Articles / Programming Languages / Python

Python vs C++ Series: Variable Scope

Rate me:
Please Sign up or sign in to vote.
5.00/5 (6 votes)
25 Oct 2021CPOL4 min read 6.3K   5  
Some Python scope rules that are not intuitive for people from a C++ background
Every programming language has its way of defining scope, and most of them work similarly and have similar scope levels such as block scope and function scope. However, in some cases, Python scope rules that are not intuitive for people from a C++ background.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
My name is Shun. I am a software engineer and a Christian. I currently work at a startup company.
My Website: https://formosa1544.com
Email: shun@formosa1544.com

Comments and Discussions