Created
November 21, 2013 20:43
-
-
Save piotrplaneta/7589254 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| filepath = "../test" | |
| def parse_input(input): | |
| lines = input.split("\n") | |
| parse_lines(lines[1:-2]) | |
| def parse_lines(lines): | |
| list_container = list() | |
| tmp_list = list() | |
| for line in lines: | |
| chars_container = list() | |
| for char in line: | |
| if char != " ": | |
| tmp_list.append(1) | |
| else: | |
| tmp_list.append(0) | |
| print(char) | |
| if len(tmp_list) == 3: | |
| chars_container.append(tmp_list) | |
| tmp_list = list() | |
| list_container.extend(chars_container) | |
| numbers = [] | |
| for i in range(0,9): | |
| import pdb; pdb.set_trace() | |
| numbers.append(list_container[i].extend(list_container[i+9]).extend(list_container[i + 18])) | |
| import pdb; pdb.set_trace() | |
| if __name__ == "__main__": | |
| input = """ | |
| _ _ _ _ _ _ _ | |
| | _| _||_||_ |_ ||_||_| | |
| ||_ _| | _||_| ||_| _| | |
| """ | |
| parse_input(input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment