Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def podrzavi(drzava):
- f = open("mountains.txt", "r")
- lista = []
- for vrh in f:
- temp = vrh.split("|")
- for k in temp:
- if k.find(drzava) != (-1):
- lista.append(temp[0])
- #print lista, "\n"
- f.close()
- def u2drzave():
- f = open("mountains.txt", "r")
- list = []
- for vrh in f:
- temp = vrh.split("|")
- visina = temp[1]
- if visina < 8100 and visina > 7700:
- for i in range(1,len(temp),1):
- if temp[i].find("/") != (-1):
- list.append(temp[0])
- print list, "\n"
- f.close()
- if __name__ == "__main__":
- #drzava = raw_input("Unesite neku drzavu: ")
- #podrzavi(drzava)
- u2drzave
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement