Answer the question
In order to leave comments, you need to log in
How to split a string from SQL into characters?
Hello!
There is a sign login, password it is
necessary to break the password into separate characters (as an array)
SELECT gives out the password like this: [('123456',)]
Answer the question
In order to leave comments, you need to log in
select into a variable, and then, in python, you can access the elements of the string by index.
If you need to make a list: list(var_password)
If your answer is returned as a tuple in an array of one element, then list(password[0][0]) - list creates a list from the first element of the tuple in the first element of the array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question