0

Trying to replace single quotes:

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

desired output

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

1

2 Answers 2

3

Just do

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

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.