Further conversion to Python3.

This commit is contained in:
Cas Cremers
2020-10-28 15:13:02 +01:00
parent a87453f84a
commit 088bdd3cfd
14 changed files with 131 additions and 131 deletions

View File

@@ -5,15 +5,15 @@
def confirm(question):
answer = ''
while answer not in ('y','n'):
print question,
answer = raw_input().lower()
print(question, end=' ')
answer = input().lower()
return answer == 'y'
def exists(func,list):
return len(filter(func,list)) > 0
return len(list(filter(func,list))) > 0
def forall(func,list):
return len(filter(func,list)) == len(list)
return len(list(filter(func,list))) == len(list)
def uniq(li):
result = []