1import os
2
3# get size in bytes
4path = 'path/to/file.txt'
5size = os.path.getsize(path)
1import os
2the_file_that_you_Want_to_check_the_size = os.path.getsize("The file Name")
3print(the_file_that_you_Want_to_check_the_size)
4# Your result #
1import os
2filepath='file1.txt'
3size=os.path.getsize(filepath)
4print(str(size) + ' Bytes')
5