How to extract string inside a string in python? -


need solution bellow code.

variable = ' "value" ' 

how variable = 'value'

thanks

try:

variable.replace("\"","").strip() 

replace replaces double quotes nothing (removes it) , strip() removes trailing , leading spaces


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -