Below for everyone to share a python implementation of the multiple print output is synthesized an array, with a good reference value, I hope to help you. Come and see it together.
For example, there is the following code:
For I in range: print ("%s"% (F_list[i].name))
The execution of the code snippet generates a string of 10 lines of the "name" property as follows
F1f2f3f4f5f6f7f8f9f10
If we modify the above code snippet as follows:
For I in range: print ("\"%s\ ","% (F_list[i].name)),
The result of the code execution becomes the following:
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
In this way, we can use the above execution results to construct the desired array. Like what:
Flownamelist = ["F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10"]
Attention:
A comma ', ' is added at the end of the print statement to make the print output non-wrapped;
Output double quotation mark ' ', need to use the escape character ' \ '.