from fastcore.all import *
Deck the Halls
= "Deck the halls with boughs of holly"
x x
'Deck the halls with boughs of holly'
"la")*8 L(
(#8) ['la','la','la','la','la','la','la','la']
def sing(): return L("Fa", *L("la")*8)
sing()
(#9) ['Fa','la','la','la','la','la','la','la','la']
print("Tis the season to be jolly")
Tis the season to be jolly
" ".join(sing())
'Fa la la la la la la la la'
repr("Don we now our gay apparel")
"'Don we now our gay apparel'"
= sing()
s s
(#9) ['Fa','la','la','la','la','la','la','la','la']
"".join(s[0:3])
'Falala'
for i in range(0,3): print("".join(s[i:i+3]))
Falala
lalala
lalala
"Troll the ancient yuletide carol"
'Troll the ancient yuletide carol'
zip(s[0:5], s[1:5])) + 'la' L(
(#5) [('Fa', 'la'),('la', 'la'),('la', 'la'),('la', 'la'),'la']