# coding: utf-8
f=open("genesis.txt")
text=f.read()
f.close()
text
text[:10]
dir(text)
text[:30]
text[:30].lower()
text[:30].uper()
text[:30].upper()
text[:30].capitalize()
text[1:30].capitalize()
text[:30].title()
text[:30].swapcase()
"čřžščřž".upper()
text[:30]
text[1:30]
text[8:20]
text[8:16]
text[8:17]
text[8:17].isalnum()
text[8:17].islower()
text[8:17].isupper()
text[8:17].istitle()
text[8:17].isdigit()
text.split()
[   text.split()]
"day".isalnum()
"day.".isalnum()
[t for t in text.split()]
[t for t in text.split() if not t.isalnum()]
[t.upper() for t in text.split() if not t.isalnum()]
" ".join([t.upper() for t in text.split() if not t.isalnum()])
" ".join([t.lower() if t.isalnum() else t.upper() for t in text.split()])
" ".join([t.lower() if t.isalnum() else t.upper() for t in text.split()])
if 'God' in text:
    print("yeah!")
    
text
if 'God' in text:
    print("yeah!")
    
if 'God' in text.split():
    print("yeah!")
    
    
if 'Go' in text.split():
    print("yeah!")
    
    
if 'Go' in text:
    print("yeah!")
    
if 'Go' in text:
    print("yeah!")
    
text.count('God')
text.count('the')
text.find('God')
text.find('and')
text.replace('God','Dog').replace('the','ugly')
text.replace('God','Dog').replace('the ','ugly ')
text.replace('God','Dog').replace('the ','ugly ')
text.split('the')
text.split('.')
[s[:10] for s in text.split('.')]
text.splitlines()
a="""
asdfasdfa
asdfasdfasdf
asdfasd
"""
a.splitlines()
a.split('\n')
"\n".a.split('\n')
"\n".join(a.split('\n'))
print("\n".join(a.split('\n')))
text
[t if len(t) > 6 for t in text.split()]
[t for t in text.split() if len(t) > 6]
" ".join([t for t in text.split() if len(t) > 6])
" ".join([t for t in text.split() if len(t) > 5])
" ".join([t for t in text.split() if len(t) < 5])
" ".join([t for t in text.split() if len(t) < 4])
" ".join([t for t in text.split() if len(t) > 6])
" ".join([t for t in text.split() if len(t) > 5])
dir(str)
"And".istitle()
"And".isupper()
"AND".isupper()
"AND".istitle()
[x for x in text.split() if x.istitle()]
set([x for x in text.split() if x.istitle()])
{x for x in text.split() if x.istitle()}
set([x for x in text.split() if x.istitle()])
{x for x in text.split() if x.istitle()}
[x for x in text.split() if x.istitle()]
len([x for x in text.split() if x.istitle()])
len(set([x for x in text.split() if x.istitle()]))
[x for x in text.split() if x.istitle()]
from collections import Counter
Counter([x for x in text.split() if x.istitle()])
{x for x in text.split() if x.istitle()}
Counter([x for x in text.split() if x.istitle()])
Counter([x for x in text.split() if x.istitle()])
a
b = a.splitlines()
b
[t in b if t.starstwith('')]
[t in b if t.starstwith('a')]
[t for t in b if t.starstwith('a')]
[t for t in b if t.startstwith('a')]
[t for t in b if t.startswith('a')]
[t for t in b if t.endswith('a')]
