MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/igvny1/python_goes_brrrr/g2x2gpx/?context=3
r/ProgrammerHumor • u/das_freak • Aug 26 '20
789 comments sorted by
View all comments
Show parent comments
0
[deleted]
19 u/Sir_Bucket Aug 26 '20 Yes you can, you need to double them:print(f”open: {{ close: }}”)Result:open: { close: } 6 u/Terrain2 Aug 26 '20 And it’s the exact same thing in C#, but they’re $stringsSystem.Console.WriteLine($"open: {{ close: }}");same result 1 u/ArionW Aug 26 '20 Does anyone ever use name "$string"? Years of coding in C# and not once have I heard anyone calling it something other than "string interpolation" → More replies (2)
19
Yes you can, you need to double them:
print(f”open: {{ close: }}”)
Result:
open: { close: }
6 u/Terrain2 Aug 26 '20 And it’s the exact same thing in C#, but they’re $stringsSystem.Console.WriteLine($"open: {{ close: }}");same result 1 u/ArionW Aug 26 '20 Does anyone ever use name "$string"? Years of coding in C# and not once have I heard anyone calling it something other than "string interpolation" → More replies (2)
6
And it’s the exact same thing in C#, but they’re $strings
System.Console.WriteLine($"open: {{ close: }}");
same result
1 u/ArionW Aug 26 '20 Does anyone ever use name "$string"? Years of coding in C# and not once have I heard anyone calling it something other than "string interpolation" → More replies (2)
1
Does anyone ever use name "$string"? Years of coding in C# and not once have I heard anyone calling it something other than "string interpolation"
→ More replies (2)
0
u/[deleted] Aug 26 '20
[deleted]