Q
querypk
how do I convert
b is a string b = '(1,2,3,4)' to b = (1,2,3,4)
b is a string b = '(1,2,3,4)' to b = (1,2,3,4)
b is a string b = '(1,2,3,4)' to b = (1,2,3,4)
how do I convert
b is a string b = '(1,2,3,4)' to b = (1,2,3,4)
Pass it to eval:
(1, 2, 3, 4, 5)
Steven said:Just be sure you know where your strings come from. You wouldn't want
someone to pass you
"""__import__('os').system('rm -rf /')"""
and then send that to eval. =)
how do I convert
b is a string b = '(1,2,3,4)' to b = (1,2,3,4)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.