forked from XAFFI/pythontest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
49 lines (43 loc) · 848 Bytes
/
test.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
# hello = "test python"
# print(hello.title())
# print(hello.upper())
# print(hello.lower())
list = ["fff", "aaaa", "sdfsdf"]
print(list)
print(list.pop())
print(list)
list.append("ssss")
print(list)
list.insert(1, "sfs")
print(list)
if list.__contains__("sfsfs"):
list.remove("sfsfs")
else:
print("none")
list.sort()
print(list)
list.sort(reverse=True)
print(list)
list.reverse()
print(list)
print("list sorted")
print(sorted(list, reverse=True))
print(list)
print(sorted(list))
print(list)
print(len(list))
# message = input("tell me your word !")
# message = int(message)
# print(message > 10)
# while循环后面要加:
text = ""
def test():
print(text)
age = "sdfs"
#可以用来判断是否为空串
if age:
print("age is none")
while text != "exit":
text = input("请输入退出")
test()
print("not quit")