例如,以英尺和英寸为例:我怎么能把其中的一个元素分解成这样的东西:
"the person is 5 feet 11 inches tall."feet {} inches tall.".format(list[1], list[1]) #I am aware taking the same index of list will give me 5-
我试图将在下面的循环中创建的变量$d、$tf_name、$db_orig存储到一个文件中。我希望以一个以选项卡分隔的MY_FILE.txt结束,该选项卡包含以下字段$d、$tf_name、$db_orig以及这组变量的每一次迭代,这些变量将存储在文件MY_FILE.txt的新行中。MY_ARRAY=() do
folderIN=(${IN//_/ })
tf_name=${folderIN[-1]%