Skip to content

Instantly share code, notes, and snippets.

View andriiburka's full-sized avatar
☑️
Nope

Andrii Burka andriiburka

☑️
Nope
View GitHub Profile
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]
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]
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]
import re
likes = {}
unlikes = 0
while True:
usr_in = input()
if "Stop" in usr_in:
break
else:
import re
likes = {}
unlikes = 0
while True:
usr_in = input()
if "Stop" in usr_in:
break
else:
@andriiburka
andriiburka / 5_Furniture.py
Created March 21, 2020 23:37
05. Furniture 100/100
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]+)"
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:
# Whyyyy? 0/100
import re
all_user_inputs = ''
while True:
user_input = input()
if len(user_input) == 0:
break
else:
import re
all_user_inputs = ''
while True:
user_input = input()
if len(user_input) == 0:
break
else:
all_user_inputs += (user_input + " ")
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(): # ДЕЛИМ