This is my first question on any StackExchange site, so please bear with me.
I am writing code for a paragraph of normal English with little bits of code spliced in. Initially I wrote something like:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \verb|\tikzset{help lines/.style = gray, very thin}| tempor incididunt ut labore et dolore magna aliqua.
However, in the output of that code, the phrase "\tikzset{help lines/.style = gray, very thin}" tended to poke out of the margins. Therefore, I was relieved to find Gonzalo Medina's solution to that problem at https://tex.stackexchange.com/a/121618/277990. However, his solution causes a different problem, which is what my question is about. Namely, his solution requires the phrase "\tikzset{help lines/.style = gray, very thin}" to appear on its own line, whereas I want it to appear "in-line." (The difference I'm talking about is similar to that between display-style math and text-style math.)
Please let me know whether I've explained my question clearly. I haven't tried many solutions, because I'm still new to LaTeX so I wouldn't know where to begin. Thank you!

\verb|\tikzset{help lines/.style = gray, very thin}|with{\ttfamily\string\tikzset\{help lines/.style = gray, very thin\}}? – Mico Aug 09 '22 at 21:39listingspackage:\lstset{basicstyle=\ttfamily, breaklines=true}and use\lstinline|<code here>|to put a content in verbatim with line breaks. – Celdor Aug 09 '22 at 21:52