How can I assign values to variables by using two lists:
Numbers =[1,2,3,4,]
Element= ["ElementA","ElementB","ElementC","ElementD"]
for e, n in zip(Element, Numbers):
e+ ' = ' +n #this part is wrong
What i want is a result like this in the end:
print ElementA
>1
print ElementB
>2
print ElementC
>3
print ElementD
>4
So what im trying to do is to fill up variables created from one list (Element) with values from another list (Numbers) in a kind of loop style. Does anyone know how to archive something like that? It should also be possible to assign many values contained in a list/array to variables.
d = dict(zip(Element, Numbers))laspyto open/connect a .las file in/to python. Well i can read out which information is available (and i want to save all that information to the corresponding variables). Then if i writeXcoordinate = mydataname.Xi can saveall X valuesin the variableXcoordinate. And i want to do that for all the available information (X, Y, Z, classification etc.) not having to read the information out manually and type that code 8 times. Always just changing the variable name and the part behind the pointmydataname.(X,Y,Z etc)