0

Trying to replace single quotes:

input= "something='Null', someone=Null, somethingmore='realval'"

desired output

"something=Null, someone=Null , somethingmore='realval'"

Kid101
  • 1,440
  • 11
  • 25
  • 2
    Does this answer your question? [How to use string.replace() in python 3.x](https://stackoverflow.com/questions/9452108/how-to-use-string-replace-in-python-3-x) – whackamadoodle3000 Feb 16 '21 at 19:25

2 Answers2

3

Just do

input.replace("'Null'", "Null")

but don't use input as a variable, since it is also the builtin input function.

whackamadoodle3000
  • 6,684
  • 4
  • 27
  • 44
2

Try using the replace function:

input = "something='Null', someone=Null"
print(input)

output = input.replace("'Null'", "Null")
print(output)

The output:

something='Null', someone=Null
something=Null, someone=Null
Gabi
  • 103
  • 3
  • 9