-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
39 lines (29 loc) · 694 Bytes
/
test.py
File metadata and controls
39 lines (29 loc) · 694 Bytes
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
def getmin(a, b, c):
if a <= b and a <= c:
print(a)
elif b <= a and b <= c:
print(b)
else:
print(c)
def filtername(name):
if len(name) > 3:
return name[:3]
elif len(name) < 3:
return name + " " * (3 - len(name))
return name
def filternames(names):
re = []
for n in names:
if len(n) != 3:
re += [filtername(n)]
return re
def printsort2(x):
for i in range(len(x) - 1):
for j in range(1 + i, len(x)):
if x[i] > x[j]:
x[i], x[j] = x[j], x[i]
for a in x:
print(a, end=" ")
def print_hell(inp):
if "안녕" in inp:
print("Hello")