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
| import unittest | |
| import os | |
| import solution | |
| import shutil | |
| CLASSES_FILE = """ | |
| class A: |
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
| def ExOh(str): | |
| str = str.lower() | |
| return str.count('x') == str.count('o') |
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
| def ABCheck(str): | |
| str = str.lower() | |
| next_a = -1 | |
| next_b = -1 | |
| for position, letter in enumerate(str): | |
| if position == next_a and letter == 'a' or position == next_b and letter == 'b': | |
| return True | |
| if letter == 'a': |
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
| def dashInsert(num): | |
| new_str = '' | |
| previous_is_odd = False | |
| for number in str(num): | |
| if int(number)%2 == 1: | |
| if previous_is_odd: | |
| new_str += '-' | |
| previous_is_odd = True | |
| else: |
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
| def ExOh(str): | |
| return str.count('x') == str.count('o') |