- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
#array function
#array.fromfile(f, n)
#array.tofile(f)
import array
f = open("C:\\Users\\Fahad Ali Khan\\Desktop\\foa\\foa.txt", "wb")
array.array("i", [1, 2, 3, 4]).tofile(f)
f.close()
ints = array.array("i")
f = open("C:\\Users\\Fahad Ali Khan\\Desktop\\foa\\foa.txt", "rb")
ints.fromfile(f, 4)
print (ints)
- Get link
- X
- Other Apps
Comments
Post a Comment