How to remove quotes from the start of the string in Python

1 Answer

0 votes
s = '"python"'

new_string = s.lstrip('\"')

print("{}".format(s))
print("{}".format(new_string))

  
  
  
'''
run:
  
"python"
python"

'''

 



answered Apr 13, 2021 by avibootz

Related questions

1 answer 118 views
1 answer 141 views
3 answers 220 views
2 answers 155 views
1 answer 180 views
...