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
27
28
names = ["faraz", "shima", "peyman", "sanaz", "samaneh", "mohamd reza"]

for i in names:
  print(f"My name is {i}.")


for i in range(20):
    print(f"Number {i}.")

my_friend = {
  "peyman": 37,
  "sanaz": 34,
  "shima": 35,
}

for name, age in my_friend.items():
  print(f"{name} is {age} years old.")

print(my_friend.items())

for i in [("shima", 35), ("peyman", 37), ("sanaz", 35)]:
  (name, ages) = i
  print(name)
  print(ages)

peyman = "peyman"
if peyman in my_friend:
  print(f"I know {peyman}.")