Remove quotes from around a string.
(string: str)
| 146 | |
| 147 | |
| 148 | def dequote(string: str) -> str: |
| 149 | """Remove quotes from around a string.""" |
| 150 | if ((string.startswith('"') and string.endswith('"')) or |
| 151 | (string.startswith("'") and string.endswith("'"))): |
| 152 | return string[1:-1] |
| 153 | else: |
| 154 | return string |
| 155 | |
| 156 | |
| 157 | class EmStrongItem(NamedTuple): |