Satyam Shukla’s Post

View profile for Satyam Shukla, graphic

Exploring AI & Machine Learning | Mastering Data Structures & Algorithms with Python | Proficient in MERN Stack Development

🤔 **Python Trick Challenge: Can You Solve This?** 🤔 Here’s a little brain teaser for all the Python pros out there: 🔍 **What will be the output of this code?** ```python x = 10 def foo():   global x   x = x + 1   print(x) foo() print(x) ``` Twist: What happens when you modify a global variable inside a function? Why does it behave this way? 💡 Drop your answers in the comments and let’s see who can explain this Python quirk the best! 😏 #PythonChallenge #TrickQuestion #PythonProgramming #CodeTeaser #TechPuzzle

To view or add a comment, sign in

Explore topics