Python Forum
Is it possible to have an apostrophe inside { } in an f-string?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to have an apostrophe inside { } in an f-string?
#2
I got it to work by making the outer string a triple quoted string. But really, at this point I'd use a format call or another variable to hold the result of the random.choice call.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: Is it possible to have an apostrophe inside { } in an f-string? - by ichabod801 - Sep-04-2019, 01:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CSV not printing apostrophe correctly bazcurtis 8 2,565 Aug-22-2022, 04:28 PM
Last Post: bazcurtis
  converting string object inside a list into an intiger bwdu 4 2,696 Mar-31-2020, 10:36 AM
Last Post: buran
  Python Parameter inside Json file treated as String dhiliptcs 0 1,868 Dec-10-2019, 07:28 PM
Last Post: dhiliptcs
  If statement containing apostrophe AshBax 11 5,337 Jul-09-2019, 01:34 PM
Last Post: AshBax
  How do I put a variable inside a String in Python? evilcode1 8 6,166 Sep-25-2018, 04:53 PM
Last Post: evilcode1
  replace string inside double quotes jmpatx 10 16,773 Apr-26-2017, 05:27 AM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020