# List
listX = ['x','y','z']
var1, var2, var3 = [i for i in listX]
print(var1, var2, var3)
# List
listY = [[1,2],[3,4],[5,6]]
var4, var5, var6 = [i for i in listY]
print(var4, var5, var6)
# Tuple
listZ = [(1,2),(3,4),(5,6)]
var7, var8, var9 = [i for i in listZ]
print(var7, var8, var9)
Set multiple variable from a List/Tuple value
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.