Files

11 lines
316 B
Python

#!/usr/bin/env python3
# Check the text_stats.py file
p = '/root/.hermes/wizard-outputs/spark/text_stats.py'
with open(p) as f:
c = f.read()
print('File length:', len(c), 'chars')
print('Ends with newline:', c.endswith('\n'))
print('splitlines count:', len(c.splitlines()))
print('word count:', len(c.split()))