-
Notifications
You must be signed in to change notification settings - Fork 0
/
03.07.py
executable file
·71 lines (48 loc) · 1.34 KB
/
03.07.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
glist = []
glist.append('sergey')
glist.append('mikhail')
glist.append('dmitriy')
#print(glist)
message = 'Thank you for coming to my dinner,'
nmesg = "will not be coming today!"
print(f"{glist[1].title()} {nmesg}")
glist[1] = 'alexey'
#print(glist)
fmesg = f"{message} {glist[0].title()}!"
print(fmesg)
fmesg = f"{message} {glist[1].title()}!"
print(fmesg)
fmesg = f"{message} {glist[2].title()}!"
print(fmesg)
amesg = "More people will attend my dinner today!"
print(amesg)
glist.insert(0,'tanya')
glist.insert(2,'sasha')
glist.append('daria')
#print(glist)
fmesg = f"{message} {glist[0].title()}!"
print(fmesg)
fmesg = f"{message} {glist[2].title()}!"
print(fmesg)
fmesg = f"{message} {glist[5].title()}!"
print(fmesg)
#new message following the new task
nnmesg = "Sorry all, todays dinner will be attended by 2 people!"
print(nnmesg)
bmesg = "We are sorry that your invitation is cancelled"
nnnmesg = "Previous invitation is still valid"
popped_ppl = glist.pop()
print(f"{bmesg}, {popped_ppl.title()}!")
popped_ppl = glist.pop()
print(f"{bmesg}, {popped_ppl.title()}!")
popped_ppl = glist.pop()
print(f"{bmesg}, {popped_ppl.title()}!")
popped_ppl = glist.pop()
print(f"{bmesg}, {popped_ppl.title()}!")
fmesg = f"{nnnmesg}, {glist[0].title()}!"
print(fmesg)
fmesg = f"{nnnmesg}, {glist[1].title()}!"
print(fmesg)
del glist[1]
del glist[0]
print(glist)