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?
#4
Just a gentle nudging: it's not good practice to obscure code with cryptic abbreviations.

If code base grows and other people read the code they will need additional effort to mentally parse what the heck 'rc' does. There are conventions of using abbreviations ('import pandas as pd', 'import numpy as np') but I don't think that 'from random import choice as rc' is widespread convention.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  CSV not printing apostrophe correctly bazcurtis 8 2,552 Aug-22-2022, 04:28 PM
Last Post: bazcurtis
  converting string object inside a list into an intiger bwdu 4 2,676 Mar-31-2020, 10:36 AM
Last Post: buran
  Python Parameter inside Json file treated as String dhiliptcs 0 1,866 Dec-10-2019, 07:28 PM
Last Post: dhiliptcs
  If statement containing apostrophe AshBax 11 5,317 Jul-09-2019, 01:34 PM
Last Post: AshBax
  How do I put a variable inside a String in Python? evilcode1 8 6,153 Sep-25-2018, 04:53 PM
Last Post: evilcode1
  replace string inside double quotes jmpatx 10 16,745 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