Skip to content

Instantly share code, notes, and snippets.

#skilar einum staf mismunandi
def main ():
textfile = "advent2.txt"
readfile = readtextfile(textfile)
lineread = readlines(readfile) #["abcde","abcde","abxcd","abjcd","abcde"]
linecount = 1
targetcount = 0
for i in range(0,len(lineread)):
line = lineread[targetcount]
import numpy as np
def advent():
nutlist = []
textfile = open("advent2.txt","r")
for line in textfile:
strippy = line.strip("\n")
nutlist.append(strippy)
#print(nutlist)
def advent():
nutlist = []
textfile = open("advent2.txt","r")
for line in textfile:
strippy = line.strip("\n")
nutlist.append(strippy)
#print(nutlist)
return nutlist
import numpy as np
def advent():
nutlist = []
textfile = open("advent2.txt","r")
for line in textfile:
strippy = line.strip("\n")
nutlist.append(strippy)
#print(nutlist)
my_int = 156 #int(input('Give me an int >= 0: '))
bstr = ""
while my_int != 0:
result = int(my_int/2)
if int(my_int) is int(result+result):
"0" += bstr
my_int += int(-result)
else:
my_int = result
class Clock:
def __init__(self,hours = 0,minutes = 0,seconds = 0):
self.hours = hours
self.minutes = minutes
self.seconds = seconds
def add_clocks(self,var1,var2,var3):
self.hours = var1
self.minutes = var2
self.seconds = var3
class Clock:
def __init__(self,hours = 0,minutes = 0,seconds = 0):
self.hours = hours
self.minutes = minutes
self.seconds = seconds
def add_clocks(self,var1,var2,var3):
self.hours = var1
self.minutes = var2
self.seconds = var3
RANK = 0
NAME = 1
COUNTRY = 2
POINTS = 3
BIRTH_YEAR = 4
def get_input(user_prompt):##
user_input = input(user_prompt)
RANK = 0
NAME = 1
COUNTRY = 2
POINTS = 3
BIRTH_YEAR = 4
def get_input(user_prompt):##
user_input = input(user_prompt)
import string
#a_str = "goat. in a boat. sometimes afloat, without a boat and a goat"
#def string_to_list(a_string):
#a_list = []
#for words in a_string.split(" "):
#a_list.append(words)
#print(a_list)
#return a_list