Pyble

Print the shortest and longest verses in the Bible with Python

#!/usr/bin/env python3
import os
base=os.path.dirname(os.path.abspath(__file__))
path=os.path.join(base,"kjv.txt")
with open(path) as f:
    print("Shortest verse:",min(f,key=len))
with open(path) as f:
    print("Longest verse:",max(f,key=len))

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment