Mar-15-2019, 04:42 PM
I have some trouble with my list. I need to print the number line per line. the list looks like that.
thank for the help. I know is a lot of stock, but I wanted to explain it well.
python 3.7.2
[16, 1, 1, 3, 6, 5, 87, 4, 83, 0, 2, 7, 86, 54, 32, 78, 45, 21, 23, 41, 35, 76, 90] #the name of the list is yI have tried that
y=list(map(int, y)) y=str(y) y=int(y) f = sftp.open("/home/pi/SiteCyberdependance/data/data.txt", "w+") with sftp.open("/home/pi/SiteCyberdependance/data/data.txt", "w") as f: for line in f: sftp=paramiko.SFTPFile.write f.write(y[z]) z=z+1the program write that in my file
16, 1, 1, 3, 6, 5, 87, 4, 83, 0, 2, 7, 86, 54, 32, 78, 45, 21, 23, 41, 35, 76, 90]I need the numbers in my file looks like that.
16 1 1 3 6 5 87 4 83 0 2 7 86 54 32 78 45 21 23 41 35 76 90and I need to increment the number of my choice, I have tried that.
g=[1,0,0,0,0,0,0,0,0,0,0,0,0] y=y+g #I do that because y+g don't workits result to add the content of list g at the end of the list y.
thank for the help. I know is a lot of stock, but I wanted to explain it well.
python 3.7.2