If the quotes you want to strip are always going to be “first and last” as you said, then you could simply use:
string = string[1:-1]
More Related Contents:
- How do I trim whitespace?
- Strip spaces/tabs/newlines – python
- How to strip a specific word from a string?
- What does += mean in this context?
- How to convert a string in the desired manner?
- Why does comparing strings using either ‘==’ or ‘is’ sometimes produce a different result?
- Format timedelta to string
- How to search and replace text in a file?
- Convert JSON string to dict using Python
- Print string to text file
- How can I do multiple substitutions using regex?
- How to find char in string and get all the indexes?
- How to match any string from a list of strings in regular expressions in python?
- Extract email sub-strings from large document
- Math operations from string [duplicate]
- Find index of last occurrence of a substring in a string
- Safely evaluate simple string equation
- Python code to remove HTML tags from a string [duplicate]
- How to print like printf in Python3?
- Why are Python strings immutable? Best practices for using them
- Replacing specific words in a string (Python)
- Capitalize first letter of each word in a dataframe column
- How can I split this comma-delimited string in Python? [duplicate]
- How to change a string into uppercase
- How do I check for an exact word or phrase in a string in Python
- Why doesn’t calling a string method (such as .replace or .strip) modify (mutate) the string?
- CSV reader behavior with None and empty string
- How do I convert a list of ascii values to a string in python?
- Finding the position of a word in a string
- Python replace function [replace once]