Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('D:\python1\PAMPAM.txt',encoding='utf-8') as s:
- a=[line.split() for line in s]
- m=[]
- with open('D:\python1\PAMPAM.txt','w',encoding='utf-8') as s:
- for i in a:
- for k in i[:len(i)-1]:
- print(k,file=s,end = ' ')
- b=float(i[len(i)-1])
- b = b - b*0.2
- print(b,file=s)
- print(' ')
- m.append(b)
- n=str(max(m))
- with open('D:\python1\PAMPAM.txt',encoding='utf-8') as s:
- a=[line.split() for line in s]
- def f(x):
- for i in a:
- for k in i:
- if k == x:
- print('Информация о самом дорогом товаре,после уменьшения цены на 20%: ',*i)
- f(n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement