I want to use single quote in a variable name and keyword. I know how to do this for a variable value using single and double quotes("5'_Exon_Annotation") or using black slash to escape the single quote. But not sure how to do this with variable name/ key word. Below are examples of how I want to assign values to column names and a variable that needs single quote.
5'co-ordinate = "something"
gene_df = gene_df.assign(gene_position = gene_pos,
5'_co-ordinate = bkpt1_list[1],
3'_co-ordinate = bkpt2_list[1])
First of all is it possible in Python? I couldn't find a post related to this.
prime
or_prime_
instead of the single quote.globals()
orlocals()
, see my answer.déjà_vu = 42;print(déjà_vu)
orあいうえお='Japanese vowels';print(あいうえお)
. This makes it easy for non-English beginners to name objects, but it would block people to participate in a project if the character is not available on their keyboard ! For this question you would tempted to use characters that look like quotes like U+2018 LEFT SINGLE QUOTATION MARK, but they are forbidden by Python syntax, to prevent security problems. See PEP-3131 for more python.org/dev/peps/pep-3131