Skip to content

How to escape double quoted value? #542

@rohitkrishna094

Description

@rohitkrishna094

Assume my password is hello"world and the below is how I stored in .env file.

password="hello\"world"

Now I have a python script like so

password= os.getenv("password")
print(password)

This prints hello\"world. Meaning it takes the literal backslash and still keeps it in the string. How to avoid it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions