golfed on demand, python is bad at golf

This commit is contained in:
Luke Hubmayer-Werner 2022-12-06 16:04:17 +10:30
parent 0ac39a8b9a
commit 7ef16e556f
1 changed files with 7 additions and 0 deletions

7
2022/day6-mini.py Normal file
View File

@ -0,0 +1,7 @@
l=open('input/6','r').read()
def s(n):
for i in range(n,len(l)):
if len(set(l[i-n:i]))==n:
return print(i)
s(4)
s(14)