I saw a interesting solution in Python pandas curriculum.
van_crimes_df = pd.read_sql('''SELECT TYPE, MONTH, DAY, NEIGHBOURHOOD
FROM van_crimes WHERE NEIGHBOURHOOD IN ("Stanley Park", "West End")''', conn)
Then, i replace the triple quote to single quote. And it is working also, but cannot be multiline.
van_crimes_df = pd.read_sql('SELECT TYPE, MONTH, DAY, NEIGHBOURHOOD FROM van_crimes WHERE NEIGHBOURHOOD IN ("Stanley Park", "West End")', conn)
So , i guess the ''' '''
not only used for commenting many lines of code, but in certain case, could return multiline “string” like a single-line string, and then as an string input to other function/method.
Is it common practice or any other use case?