Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def existe_producto(codigo):
- inventario=open("productos.txt")
- for producto in inventario:
- codigoz=(producto.strip().split("/"))[0]
- if codigoz==str(codigo):
- inventario.close()
- return True
- inventario.close()
- return False
- def por_reabastecer():
- stock=open("por_reabastecer.txt","w")
- inventario=open("productos.txt")
- for producto in inventario:
- if int(producto.strip().split("/")[2])<10:
- stock.write(producto)
- stock.close()
- inventario.close()
- print por_reabastecer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement