Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
exec inside def is not working in python
MichaelChirico
Programming language:
Python
2021-05-31 12:33:41
0
Q:
exec inside def is not working in python
Li Zhi
Code:
Python
2021-07-01 08:20:39
def better(): d = {} exec("x=23", d) return d['x'] print better() 23
0
Tags
python
side
exec
Related
how to use def in python
def __init__
is not in python
os is not defined python
python import only one function
python else if statement not working
not in python
def form valid
python pip not working
python is not
what is def in python
def python
python not in
pip install not happening in python cmd
New to Communities?
Join the community