Answer the question
In order to leave comments, you need to log in
How to separate rubles from kopecks?
Answer the question
In order to leave comments, you need to log in
price = input()
r, c = (list(map(int, price.split('.'))) + [0])[:2]
import re
price = input('Цена: ')
a = re.findall(r"\d+\.", price)[0]
b = re.sub(f"{a}", '', price)
a = re.sub(r'\.', '', a)
print(f"{a}\n{b}")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question