Re: Need to have pymysql cursor return rows tab delimited instead of the tuple commas.

55 views
Skip to first unread message

Summet, Jay W

unread,
May 1, 2019, 12:30:28 PM5/1/19
to pymysq...@googlegroups.com
You can do that transformation in Python:

>>> a = ("a","b","c","d")
>>> a
('a', 'b', 'c', 'd')
>>> b = ""
>>> b
''
>>> for item in a:
... b = b + item + "\t"
...
>>> b
'a\tb\tc\td\t'


Jay

On 4/30/19 5:58 PM, smadirondack wrote:
> Using PyMySql I need to return rows with tab separated columns instead
> of comma separated. I understand that the cursor returns tuples. But is
> there a way to get the data tab separated?
>
> --
> You received this message because you are subscribed to the Google
> Groups "PyMySQL Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pymysql-user...@googlegroups.com
> <mailto:pymysql-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages