Hello Robert,
You’ll need to use one of Python’s string formatting features, which provide functionality for inserting variables into strings. The current state of the art are f-strings, but note that you will have to double all the curly braces in your query string if you use them because f-strings use curly braces to denote variable names.
Here’s a nice article from Real Python about all three ways to format strings in Python, and their various pros and cons.
https://realpython.com/python-f-strings/
Marijane White, M.S.L.I.S.
Data and Research Engagement Librarian, Assistant Professor
Oregon Health & Science University Library
Email: whi...@ohsu.edu
--
http://github.com/RDFLib
---
You received this message because you are subscribed to the Google Groups "rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
rdflib-dev+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rdflib-dev/e6752549-3d70-413d-9844-338a76c2cfd2n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/FB564366-1FE4-472F-84DE-75B21EA21873%40ohsu.edu.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/CAP7nqh18O_V5xibag0TJiDsoNVTOJHrSYQmyOZnt%3DHJBUF6-TA%40mail.gmail.com.
On 8 Jan 2022, at 09:22, Gunnar Aastrand Grimnes <grom...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/CAGm1ODnOe54_3YKro_vGfs%3D%2BRRq_RqychG8jWFr5x5uVkx9BWQ%40mail.gmail.com.