Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. def create_data_structure(example_input):
  2. network = {}
  3. if example_input == "":
  4. return []
  5. p = example_input.split(".")
  6. #print p
  7. i = 0
  8. j = 1
  9. for p[i] in p:
  10. if p[i] != p[j]:
  11. #print p[i]
  12. t = p[i].split("is connected to")
  13. #print t
  14. if p[j] == p[i]:
  15. s = p[j].split("likes to play")
  16. #print s
  17. for e in t:
  18. network = "e[0]"
  19. {
  20. "friends":["Bryant", "Debra", "Walter"],
  21. "games":["The Movie the Game","The Legend of Corgi", "Dinosaur Diner"]
  22. print network
  23. i = i + 2
  24. j = j + 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement