python - Converting tuple into list does not work -
I ask my SQL database to get the data from it.
connector = Sqlite3.connect ("somedb.db") selecter = connector.cursor () for selector.execute row in selector ('select from somedb' ''): l = List (line) Print (l) Print (Type (L))
Then add the
to something else I retrieve ("{}",
attributeError: There is no attribute in the 'tuple' object 'format'
/ code>
I also tried
s = ". (Str (line (line))
l = list (line)
for the statement, but it comes back with the same error and it seems That is, it converts all my 50 different selections into a string that I want.
However, when I run it
print (type (L )
or
print (type (type))
This is a form of < Code> list or
string
I can convert Works, but.format
it thinks because you do not take it that it is a tuple.How does it come?
Change it to your
< Pre>detect.that
line:this = str (detect.that) ("{}", select, summary)). Format (1)
Comments
Post a Comment