rakeshkumar1812's picture
Upload 5 files
4c9a5ed verified
raw
history blame contribute delete
793 Bytes
def remove_triple_quotes(sql_query):
print('the incoming sql_query is :\n', sql_query)
if sql_query.startswith('"""') and sql_query.endswith('"""'):
sql_query = sql_query[3:-3].strip()
print('the outgoing sql_query is :\n', sql_query)
return sql_query
elif sql_query.startswith("'''") and sql_query.endswith("'''"):
sql_query = sql_query[3:-3].strip()
print('the outgoing sql_query is :\n', sql_query)
return sql_query
elif sql_query.startswith("```") and sql_query.endswith("```"):
sql_query = sql_query[3:-3].strip()
print('the outgoing sql_query is :\n', sql_query)
return sql_query
else:
print('the outgoing sql_query is :\n', sql_query)
return sql_query