我从DB获取数据并得到了这个元组。我正在使用下面的代码将元组转换为list.but输出即将成为索引。喜欢
<?php
require_once './config/config.php';
$msg = "";
use PHPMailer\PHPMailer\PHPMailer;
if (isset($_POST['submit'])) {
$f_name = $db->real_escape_string($_POST['f_name']);
^ in the line of code above is where the error comes
以上代码返回此
${Rows} [('3/6/2018', '16', '8', '50.00', '3024', '1349', '44.61'), ('3/5/2018', '16', '9', '56.25', '3024', '2114', '69.91'), ('3/4/2018', '16', '9', '56.25', '3024', '2224', '73.54')]
${RowWise} create list
: FOR ${j} IN RANGE 0 7
\ ${row}= Evaluate [x[${j}] for x in ${Rows}]
\ append To list ${RowWise} ${row}
Log List ${RowWise}
我想要这样的东西
[('3/6/2018','3/6/2018','3/6/2018','3/6/2018','3/6/2018','3/6/2018'), ('16','16','16','16','16',)....]
你能帮我吗?
注意:使用python iam能够获得解决方案。但试图在机器人框架中实现。