Tagged articles
3 articles
Page 1 of 1
Code Mala Tang
Code Mala Tang
Jul 20, 2025 · Fundamentals

Master Python locals() and globals(): Dynamic Variable Tricks Explained

This article explores how Python's locals() and globals() functions reveal variable scopes, demonstrates why locals() cannot modify local variables, shows how globals() can dynamically alter global state, and combines them with exec() for powerful runtime variable creation and updates.

Pythondebuggingdynamic-variables
0 likes · 6 min read
Master Python locals() and globals(): Dynamic Variable Tricks Explained
Architecture Digest
Architecture Digest
Jul 18, 2025 · Fundamentals

Can a Variable Be Both 1 and 12? Exploring Impossible JS & Java Tricks

This article examines a puzzling code condition where a variable appears to satisfy contradictory checks, presents creative JavaScript and Java solutions that exploit language quirks, and reflects on the broader learning value of such unconventional programming challenges.

JavaScriptProgramming Puzzlecode tricks
0 likes · 4 min read
Can a Variable Be Both 1 and 12? Exploring Impossible JS & Java Tricks