There are two main ways to do this. If you want to preserve the brackets, you can use the str
method:
my_string = str(verrification)
or, using the join
method:
my_string = "[" + ", ".join(str(i) for i in verrification) + "]"
If you don't want to keep the brackets:
my_string = ", ".join(str(i) for i in verrification)
Please note you have to make all items a string in order to use the join
method. Here, I am using a generator expression
to convert all items into a string. This is a very basic problem, so I would suggest searching up a tutorial or looking at a beginner's course to python.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…