本问题已经有最佳答案,请猛点这里访问。
我对编程还很生涩,也看过很多类似问题的答案,但它们并没有为我带来理想的结果。你们有可能帮我吗?示例代码:
1 2 3 | shapes = ["tri","angle"] groupedShapes ="triangle" |
根据医生的说法:
string.join(words[, sep])
Concatenate a list or tuple of words with intervening occurrences of sep. The default value for sep is a single space character.
1 2 3 | shapes = ["tri","angle"] groupedShapes ="".join(shapes) #"triangle" |