📜  使用列表理解的 Python 字符串到数组 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:14.609000             🧑  作者: Mango

代码示例1
# Split the string to array of characters using list Comprehension

text1= "ABCDEFGH"
output1= [x for x in text1]
print(output1)

text2="A P P L E"
output2=[x for x in text2]
print(list(text2))