Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Amb/Python/amb-2.py
Normal file
15
Task/Amb/Python/amb-2.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# joins :: String -> String -> Bool
|
||||
def joins(a, b):
|
||||
return a[-1] == b[0]
|
||||
|
||||
|
||||
print (
|
||||
[
|
||||
' '.join([w1, w2, w3, w4])
|
||||
for w1 in ['the', 'that', 'a']
|
||||
for w2 in ['frog', 'elephant', 'thing']
|
||||
for w3 in ['walked', 'treaded', 'grows']
|
||||
for w4 in ['slowly', 'quickly']
|
||||
if joins(w1, w2) and joins(w2, w3) and joins(w3, w4)
|
||||
]
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue