+ 2
Can we transform a list into a string?
for example we have that list : name = ['D','J','A','B','E','R'] can I transform it to get the output 'DJABER'
1 Antwort
+ 2
Yes you can, try this :
s="".join(name)
s is exactly "DJABER"
in general, str.join(list) returns a string in which the elements of the list have been joined by str separator, for example, to obtain the string "DxJxAxBxExR", use "x".join(name)
good luck ☺ !