Guest User

Untitled

a guest
May 25th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. In [1]: import yaml
  2.  
  3. In [2]: f = file("cars.yml")
  4.  
  5. In [3]: yaml.load(f)
  6. Out[3]:
  7. {'constructeurs': ['bmw', 'ferarri', 'maserati'],
  8. 'tout': ['bmw', 'ferarri', 'maserati']}
  9.  
  10. In [4]: %cat ca
  11. callable cars.yml
  12.  
  13. In [4]: %cat cars.yml
  14. ERROR: Magic function `cat` not found.
  15.  
  16. In [5]: !cat ca
  17. callable cars.yml
  18.  
  19. In [5]: !cat cars.yml
  20.  
  21. constructeurs: &constructeurs
  22. - bmw
  23. - ferarri
  24. - maserati
  25.  
  26.  
  27. tout:
  28. *constructeurs
Add Comment
Please, Sign In to add comment