René's URL Explorer Experiment


Title: Python eval(): Evaluate Expressions Dynamically – Real Python

Open Graph Title: Python eval(): Evaluate Expressions Dynamically – Real Python

Description: In this step-by-step tutorial, you'll learn how Python's eval() works and how to use it effectively in your programs. Additionally, you'll learn how to minimize the security risks associated to the use of eval().

Open Graph Description: In this step-by-step tutorial, you'll learn how Python's eval() works and how to use it effectively in your programs. Additionally, you'll learn how to minimize the security risks associated to the use of eval().

Mail addresses
?subject=Python article for you&body=Python eval(): Evaluate Expressions Dynamically on Real Python https://realpython.com/python-eval-function/

Opengraph URL: https://realpython.com/python-eval-function/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Python eval(): Evaluate Expressions Dynamically",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/A-Guide-to-Python-eval-With-Examples_Watermarked.e03efb9746ae.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-eval-function/",
    "lastReviewed": "2023-10-21",
    "author": {
      "@type": "Person",
      "name": "Leodanis Pozo Ramos",
      "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
      "url": "https://realpython.com/team/lpozoramos/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Bryan Weber",
        "image": "https://realpython.com/cdn-cgi/image/width=1000,height=1000,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/BryanWeber-square.789781f1e92c.jpg",
        "url": "https://realpython.com/team/bweber/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Geir Arne Hjelle",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
        "url": "https://realpython.com/team/gahjelle/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Jacob Schmitt",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/profile-small_js.2f4d0d8da1ca.jpg",
        "url": "https://realpython.com/team/jschmitt/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2020-05-11T14:00:00+00:00",
  "dateModified": "2023-10-21T02:53:17.111123+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Leodanis Pozo Ramos",
    "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
    "url": "https://realpython.com/team/lpozoramos/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "In this step-by-step tutorial, you'll learn how Python's eval() works and how to use it effectively in your programs. Additionally, you'll learn how to minimize the security risks associated to the use of eval()."
}

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/A-Guide-to-Python-eval-With-Examples_Watermarked.e03efb9746ae.jpg
og:imagehttps://files.realpython.com/media/A-Guide-to-Python-eval-With-Examples_Watermarked.e03efb9746ae.jpg
twitter:creator@realpython
og:typearticle

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-eval-function/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/python-eval-function/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fpython-eval-function%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics
Intermediatehttps://realpython.com/search?level=intermediate
Advancedhttps://realpython.com/search?level=advanced
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-eval-function/#toc
Understanding Python’s eval()https://realpython.com/python-eval-function/#understanding-pythons-eval
The First Argument: expressionhttps://realpython.com/python-eval-function/#the-first-argument-expression
The Second Argument: globalshttps://realpython.com/python-eval-function/#the-second-argument-globals
The Third Argument: localshttps://realpython.com/python-eval-function/#the-third-argument-locals
Evaluating Expressions With Python’s eval()https://realpython.com/python-eval-function/#evaluating-expressions-with-pythons-eval
Boolean Expressionshttps://realpython.com/python-eval-function/#boolean-expressions
Math Expressionshttps://realpython.com/python-eval-function/#math-expressions
General-Purpose Expressionshttps://realpython.com/python-eval-function/#general-purpose-expressions
Minimizing the Security Issues of eval()https://realpython.com/python-eval-function/#minimizing-the-security-issues-of-eval
Restricting globals and localshttps://realpython.com/python-eval-function/#restricting-globals-and-locals
Restricting the Use of Built-In Nameshttps://realpython.com/python-eval-function/#restricting-the-use-of-built-in-names
Restricting Names in the Inputhttps://realpython.com/python-eval-function/#restricting-names-in-the-input
Restricting the Input to Only Literalshttps://realpython.com/python-eval-function/#restricting-the-input-to-only-literals
Using Python’s eval() With input()https://realpython.com/python-eval-function/#using-pythons-eval-with-input
Building a Math Expressions Evaluatorhttps://realpython.com/python-eval-function/#building-a-math-expressions-evaluator
Conclusionhttps://realpython.com/python-eval-function/#conclusion
https://realpython.com/feedback/survey/article/python-eval-function/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-eval-function/disliked/?from=article-sidebar
Evaluate Expressions Dynamically With Python eval()https://realpython.com/courses/evaluate-expressions-dynamically-python-eval/
Leodanis Pozo Ramoshttps://realpython.com/python-eval-function/#author
https://realpython.com/python-eval-function/#reader-comments
intermediatehttps://realpython.com/tutorials/intermediate/
pythonhttps://realpython.com/tutorials/python/
Understanding Python’s eval()https://realpython.com/python-eval-function/#understanding-pythons-eval
The First Argument: expressionhttps://realpython.com/python-eval-function/#the-first-argument-expression
The Second Argument: globalshttps://realpython.com/python-eval-function/#the-second-argument-globals
The Third Argument: localshttps://realpython.com/python-eval-function/#the-third-argument-locals
Evaluating Expressions With Python’s eval()https://realpython.com/python-eval-function/#evaluating-expressions-with-pythons-eval
Boolean Expressionshttps://realpython.com/python-eval-function/#boolean-expressions
Math Expressionshttps://realpython.com/python-eval-function/#math-expressions
General-Purpose Expressionshttps://realpython.com/python-eval-function/#general-purpose-expressions
Minimizing the Security Issues of eval()https://realpython.com/python-eval-function/#minimizing-the-security-issues-of-eval
Restricting globals and localshttps://realpython.com/python-eval-function/#restricting-globals-and-locals
Restricting the Use of Built-In Nameshttps://realpython.com/python-eval-function/#restricting-the-use-of-built-in-names
Restricting Names in the Inputhttps://realpython.com/python-eval-function/#restricting-names-in-the-input
Restricting the Input to Only Literalshttps://realpython.com/python-eval-function/#restricting-the-input-to-only-literals
Using Python’s eval() With input()https://realpython.com/python-eval-function/#using-pythons-eval-with-input
Building a Math Expressions Evaluatorhttps://realpython.com/python-eval-function/#building-a-math-expressions-evaluator
Conclusionhttps://realpython.com/python-eval-function/#conclusion
Remove adshttps://realpython.com/account/join/
Evaluate Expressions Dynamically With Python eval()https://realpython.com/courses/evaluate-expressions-dynamically-python-eval/
expressionshttps://realpython.com/python-operators-expressions/
compiled-code-basedhttps://docs.python.org/3/library/stdtypes.html#code-objects
stringhttps://realpython.com/python-strings/
Click here to get the code you’ll usehttps://realpython.com/bonus/python-eval-project/
https://realpython.com/python-eval-function/#understanding-pythons-eval
eval()https://docs.python.org/3/library/functions.html#eval
stringhttps://realpython.com/courses/python-strings/
bytecodehttps://docs.python.org/3/glossary.html#term-bytecode
exec()https://realpython.com/python-exec/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-eval-function/#the-first-argument-expression
compound statementshttps://docs.python.org/3/reference/compound_stmts.html
Python documentationhttps://docs.python.org/3/
Sourcehttps://docs.python.org/3/glossary.html#term-expression
Sourcehttps://docs.python.org/3/glossary.html#term-statement
SyntaxErrorhttps://realpython.com/invalid-syntax-python/
if statementhttps://realpython.com/python-conditional-statements/
tracebackhttps://realpython.com/python-traceback/
forhttps://realpython.com/python-for-loop/
whilehttps://realpython.com/python-while-loop/
importhttps://realpython.com/absolute-vs-relative-python-imports/
defhttps://realpython.com/defining-your-own-python-function/
classhttps://realpython.com/courses/intro-object-oriented-programming-oop-python/
keywordhttps://realpython.com/python-keywords/
comprehensionshttps://realpython.com/courses/using-list-comprehensions-effectively/
compiled code objectshttps://docs.python.org/3/library/stdtypes.html#code-objects
compile()https://docs.python.org/3/library/functions.html#compile
code objecthttps://docs.python.org/3/library/stdtypes.html#code-objects
AST objecthttps://docs.python.org/3/library/ast.html#ast.AST
byte stringshttps://docs.python.org/3/library/stdtypes.html#bytes-objects
official documentationhttps://docs.python.org/3/library/functions.html#compile
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-eval-function/#the-second-argument-globals
dictionaryhttps://realpython.com/python-dicts/
namespacehttps://realpython.com/python-scope-legb-rule/#python-scope-vs-namespace
current global scope or namespacehttps://realpython.com/python-scope-legb-rule/#modules-the-global-scope
namespacehttps://realpython.com/python-namespaces-scope/
variablehttps://realpython.com/python-variables/
global variablehttps://realpython.com/python-use-global-variable-in-function/
localhttps://realpython.com/python-scope-legb-rule/#nested-functions-the-enclosing-scope
nonlocalhttps://realpython.com/python-scope-legb-rule/#nested-functions-the-enclosing-scope
builtinshttps://docs.python.org/3/library/builtins.html#module-builtins
globals()https://realpython.com/python-scope-legb-rule/#globals
global scopehttps://realpython.com/python-scope-legb-rule/#modules-the-global-scope
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-eval-function/#the-third-argument-locals
variableshttps://realpython.com/python-variables/
functionshttps://realpython.com/defining-your-own-python-function/
classeshttps://realpython.com/courses/intro-object-oriented-programming-oop-python/
local scopehttps://realpython.com/python-scope-legb-rule/#functions-the-global-scope
https://realpython.com/python-eval-function/#evaluating-expressions-with-pythons-eval
https://realpython.com/python-eval-function/#boolean-expressions
Boolean expressionshttps://realpython.com/python-boolean/
Value comparison operatorshttps://docs.python.org/3/reference/expressions.html#value-comparisons
Logical (Boolean) operatorshttps://docs.python.org/3/reference/expressions.html#boolean-operations
orhttps://realpython.com/python-or-operator/
Membership test operatorshttps://docs.python.org/3/reference/expressions.html#membership-test-operations
in, not inhttps://realpython.com/python-in-operator/
Identity operatorshttps://docs.python.org/3/reference/expressions.html#is-not
is, is nothttps://realpython.com/python-is-identity-vs-equality/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-eval-function/#math-expressions
Python calculatorhttps://realpython.com/python-pyqt-gui-calculator/
user’s inputhttps://realpython.com/python-input-output/
mathhttps://realpython.com/python-math-module/
https://realpython.com/python-eval-function/#general-purpose-expressions
comprehensionshttps://realpython.com/list-comprehension-python/
https://realpython.com/python-eval-function/#minimizing-the-security-issues-of-eval
__import__()https://docs.python.org/3/library/functions.html#__import__
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-eval-function/#restricting-globals-and-locals
current scope or namespacehttps://realpython.com/python-scope-legb-rule/#python-scope-vs-namespace
https://realpython.com/python-eval-function/#restricting-the-use-of-built-in-names
sum()https://realpython.com/python-sum-function/
https://realpython.com/python-eval-function/#restricting-names-in-the-input
objecthttps://docs.python.org/3/library/functions.html#object
special methodhttps://realpython.com/python-classes/#special-methods-and-protocols
.__subclasses__()https://docs.python.org/3/library/stdtypes.html#class.__subclasses__
printhttps://realpython.com/python-print/
rangehttps://realpython.com/python-range/
subprocess.Popenhttps://docs.python.org/3/library/subprocess.html#subprocess.Popen
Eval really is dangerous.http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html
tuplehttps://realpython.com/python-tuple/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-eval-function/#restricting-the-input-to-only-literals
literal_eval()https://docs.python.org/3/library/ast.html#ast.literal_eval
listshttps://realpython.com/python-list/
tupleshttps://realpython.com/python-lists-tuples/
numbershttps://realpython.com/python-numbers/
https://realpython.com/python-eval-function/#using-pythons-eval-with-input
Python 3.xhttps://realpython.com/products/python-basics-book
input()https://docs.python.org/3/library/functions.html#input
input() in Python 2.xhttps://docs.python.org/2/library/functions.html#input
https://realpython.com/python-eval-function/#building-a-math-expressions-evaluator
Click here to get the code you’ll usehttps://realpython.com/bonus/python-eval-project/
Python scripthttps://realpython.com/run-python-scripts/#scripts-vs-modules
string constantshttps://realpython.com/python-coding-interview-tips/#access-common-string-groups-with-string-constants
floathttps://realpython.com/lessons/floats/
square roothttps://realpython.com/python-square-root-function/
main()https://realpython.com/python-main-function/
try statementhttps://docs.python.org/3/reference/compound_stmts.html#the-try-statement
run the applicationhttps://realpython.com/run-python-scripts/
command-line interfacehttps://realpython.com/python-command-line-arguments/#the-command-line-interface
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-eval-function/#conclusion
command-line interfacehttps://realpython.com/command-line-interfaces-python-argparse/
Click here to get the code you’ll usehttps://realpython.com/bonus/python-eval-project/
https://realpython.com/feedback/survey/article/python-eval-function/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-eval-function/disliked/?from=article-footer
Evaluate Expressions Dynamically With Python eval()https://realpython.com/courses/evaluate-expressions-dynamically-python-eval/
https://realpython.com/team/lpozoramos/
» More about Leodanishttps://realpython.com/team/lpozoramos/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/bweber/
Bryanhttps://realpython.com/team/bweber/
https://realpython.com/team/gahjelle/
Geir Arnehttps://realpython.com/team/gahjelle/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
https://realpython.com/team/jschmitt/
Jacobhttps://realpython.com/team/jschmitt/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-eval-function
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-eval-function
https://realpython.com/feedback/survey/article/python-eval-function/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-eval-function/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-eval-function%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Python%20eval%28%29%3A%20Evaluate%20Expressions%20Dynamically&url=https%3A%2F%2Frealpython.com%2Fpython-eval-function%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Python%20eval%28%29%3A%20Evaluate%20Expressions%20Dynamically%20https%3A%2F%2Frealpython.com%2Fpython-eval-function%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-eval-function%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
intermediatehttps://realpython.com/tutorials/intermediate/
pythonhttps://realpython.com/tutorials/python/
Evaluate Expressions Dynamically With Python eval()https://realpython.com/courses/evaluate-expressions-dynamically-python-eval/
Python's exec(): Execute Dynamically Generated Codehttps://realpython.com/python-exec/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-eval-function
Python Type Checking (Guide)https://realpython.com/python-type-checking/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-eval-function
Using and Creating Global Variables in Your Python Functionshttps://realpython.com/python-use-global-variable-in-function/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-eval-function
Python's with Statement: Manage External Resources Safelyhttps://realpython.com/python-with-statement/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-eval-function
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-eval-function%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-eval-function%2F
Sign-Inhttps://realpython.com/account/login/?next=/python-eval-function/
Start Herehttps://realpython.com/start-here/
Learning Resourceshttps://realpython.com/search
Code Mentorhttps://realpython.com/mentor/
Python Referencehttps://realpython.com/ref/
Python Cheat Sheethttps://realpython.com/cheatsheets/python/
Support Centerhttps://support.realpython.com/
Learning Pathshttps://realpython.com/learning-paths/
Quizzes & Exerciseshttps://realpython.com/quizzes/
Browse Topicshttps://realpython.com/tutorials/all/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.