Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. def podrzavi(drzava):
  2. f = open("mountains.txt", "r")
  3. lista = []
  4. for vrh in f:
  5. temp = vrh.split("|")
  6. for k in temp:
  7. if k.find(drzava) != (-1):
  8. lista.append(temp[0])
  9. #print lista, "\n"
  10. f.close()
  11.  
  12. def u2drzave():
  13. f = open("mountains.txt", "r")
  14. list = []
  15. for vrh in f:
  16. temp = vrh.split("|")
  17. visina = temp[1]
  18. if visina < 8100 and visina > 7700:
  19. for i in range(1,len(temp),1):
  20. if temp[i].find("/") != (-1):
  21. list.append(temp[0])
  22.  
  23.  
  24.  
  25. print list, "\n"
  26. f.close()
  27. if __name__ == "__main__":
  28. #drzava = raw_input("Unesite neku drzavu: ")
  29. #podrzavi(drzava)
  30. u2drzave
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement