-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2016-1-2.py
More file actions
43 lines (31 loc) · 705 Bytes
/
2016-1-2.py
File metadata and controls
43 lines (31 loc) · 705 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
38
39
40
41
42
43
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
name = "杨佰"
name_bytes = name.encode("utf-8")
name_str = name_bytes.decode("utf-8")
print(name_bytes, len(name_bytes), name_str, len(name))
print("72 / 85 = %.2f%%" % (72/86))
list1 = [1, 2, 3]
tuple1 = (1, 2)
print(list1)
sum = 0;
for i in range(1, 101):
sum += i
print(sum)
set1 = ([1, 2, 3], [1, [2, 3]])
set1[1][1] = 3
print(set1)
print(hex(12))
'''
def test(x, y, *, z=1, **d):
print(x, y, z, d)
test(1, 2, z=3,**{"name": "yangbai"})
def hannuota(n, a, b, c):
if n == 1:
print(a, "->", c)
else:
hannuota(n-1, a, c, b)
print(a, '->', c)
hannuota(n-1, b, a, c)
hannuota(2, "A", "B", "C")