@farazEskandari/

Python Dictioneries

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
friends = {
    "peyman": {
        "sex": "man",
        "age": 36,
        "job": "soundFX"
    },
    "sanaz": {
        "sex": "woman",
        "age": 33,
        "job": "yoga master"
    },
    "shima": {
        "sex": "woman",
        "age": 35,
        "job": "costume designer"
    }
}
sanaz = friends["sanaz"]
shima = friends["shima"]
peyman = friends["peyman"]
ages = sanaz["age"] + peyman["age"] + shima["age"]
print(ages)
print(peyman)
print(shima)
print(sanaz)