Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
int list have no len()
#1
I try to write my list, but I need len() for write it.
if I write in str, they print 5 item.
this is my code
y=list(map(int, y))
print(y)
y[0]+=1
print(y)

f = sftp.open("/home/pi/SiteCyberdependance/donne/donne.txt", "w+")
with sftp.open("/home/pi/SiteCyberdependance/donne/donne.txt", "w") as f:
            sftp=paramiko.SFTPFile.write
            f.write(y[item])
Error:
TypeError: object of type 'int' has no len()
Reply


Messages In This Thread
int list have no len() - by lateublegende - Mar-21-2019, 02:06 PM
RE: int list have no len() - by ichabod801 - Mar-21-2019, 02:38 PM
RE: int list have no len() - by snippsat - Mar-21-2019, 09:10 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020