Human: Python code to parse sql query string. Assistant: 
Here is a Python code to parse sql query string

import re

def parse_sql_query(query):
    """Parse sql query string"""
    return query.replace('\n','').replace('\t','').replace('\r','').replace('\'','').replace('"','').replace(' ', '+')

# Enter the query
query = "select * from t1 where a = 1"

# Calling the function
print((parse_sql_query(query)))

# Printing the query
print((parse_sql_query(query)))

#Example Output
# select+*+from+t1+where+a+=+1
# select+*+from+t1+where+a+=+1

#Remember to inspect code for bugs.