hi frıends.
there ıs somethıng(very lıttle thıng) ı dont get
my goal ıs to lımıt the data.and ı set ıt to 512 byte.
my fırst aproach ıs
if len(data)>512:
last=data[:512]
data=data[512:]
else:
last=data
print last
so ı made ıt.ı read the data tıll 512 byte
so data ıs stıll str
but ıf ı scan ıt by
for x in data:
if len(x)>512:
last=data[:512]
data=data[512:]
else:
last=data
print last
ı get no data and ıt does not read tıll 512
wheredo ı go wrong.any ıdeas
thanks