Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. cmd = ["add","show","reset"]
  2. def bibli(arg1):
  3. if arg1 is not in cmds:
  4. if arg1 is "add":
  5. bdd = open("data.txt", "a")
  6. while 1:
  7. q=input("rentrez l'url")
  8. if q=='stop':
  9. bdd.close()
  10. break
  11. else:
  12. bdd.write(q)
  13. bdd.write(" ")
  14. if arg1 is "show":
  15. bdd = open("data.txt", "a")
  16. print (bdd.read())
  17. bdd.close()
  18. if arg1 is "reset":
  19. bdd = open("data.txt", "a")
  20. bdd.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement