Quantcast
Channel: MySQL Forums - Connector/Python
Viewing all articles
Browse latest Browse all 384

Printing array values (no replies)

$
0
0
I'm trying to do this:
Code:
myArray = "value1","value2","value3","value4"
print("%s,%s,%s,%s"%myArray)
obviously it doesn't work, but is there a way to do that and avoid listing all every single element?

I'm trying to avoid doing this:
Code:
myArray = "value1","value2","value3","value4"
print("%s,%s,%s,%s"%(myArray[0],myArray[1],myArray[2],myArray[3]))

Viewing all articles
Browse latest Browse all 384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>