Python: Difference between revisions

265 bytes added ,  23 September 2019
no edit summary
No edit summary
No edit summary
Line 20: Line 20:
gazeFiles = [path.join(x, y) for x in gazeFolders for y in os.listdir(x)]
gazeFiles = [path.join(x, y) for x in gazeFolders for y in os.listdir(x)]
</syntaxhighlight>
</syntaxhighlight>
===Read entire text file into a list===
[https://stackoverflow.com/questions/3925614/how-do-you-read-a-file-into-a-list-in-python/3925701]
<syntaxhighlight lang="python">
with open('C:/path/numbers.txt') as f:
    lines = f.read().splitlines()
</syntaxhighlight>


=Libraries=
=Libraries=
==Numpy==
==Numpy==