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 re | |
usr_in = input() | |
while True: | |
command = input() | |
if "Finish" not in command: | |
command = command.split() | |
if "Replace" in command: | |
old_char = command[1] | |
new_char = command[2] |
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 re | |
usr_in = input() | |
while True: | |
command = input() | |
if "Finish" not in command: | |
command = command.split() | |
if "Replace" in command: | |
old_char = command[1] | |
new_char = command[2] |
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 re | |
usr_in = input() | |
while True: | |
command = input() | |
if "Finish" not in command: | |
command = command.split() | |
if "Replace" in command: | |
old_char = command[1] | |
new_char = command[2] |
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 re | |
likes = {} | |
unlikes = 0 | |
while True: | |
usr_in = input() | |
if "Stop" in usr_in: | |
break | |
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
import re | |
likes = {} | |
unlikes = 0 | |
while True: | |
usr_in = input() | |
if "Stop" in usr_in: | |
break | |
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
import re | |
data_list = [] | |
total = 0 | |
while True: | |
user_input = input() | |
if "Purchase" in user_input: | |
break | |
else: | |
pattern = r">>([A-Za-z]+)<<([0-9]+\.?[0-9]+)!([0-9]+)" |
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 re | |
pattern = r"^>>([A-Za-z]+)<<(\d+.?\d+!\d+)$" | |
txt = '''''' | |
while True: | |
user_input = input() | |
if "Purchase" in user_input: | |
txt += "\n" + user_input | |
break | |
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
# Whyyyy? 0/100 | |
import re | |
all_user_inputs = '' | |
while True: | |
user_input = input() | |
if len(user_input) == 0: | |
break | |
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
import re | |
all_user_inputs = '' | |
while True: | |
user_input = input() | |
if len(user_input) == 0: | |
break | |
else: | |
all_user_inputs += (user_input + " ") |
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
text = input().replace(" ", "").split() | |
alphabet = {chr(i): i - 96 for i in range(ord('a'), ord('z') + 1)} | |
total = [] | |
for word_index in range(len(text)): # for word in text | |
tup = int(text[word_index][1:-1]), text[word_index][0], text[word_index][-1] | |
current = 0 | |
for char in range(1, len(tup)): | |
if char == 1: | |
if tup[char].isupper(): # ДЕЛИМ |