-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhello.py
More file actions
37 lines (30 loc) · 677 Bytes
/
hello.py
File metadata and controls
37 lines (30 loc) · 677 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
import sys
print("helo python world!")
if sys.argv[1] == 'yes':
print("you said yes")
elif sys.argv[1] == 'no':
print("you said no")
print(sys.argv[0:])
for i in range(1, 11):
print(i, end='')
print()
arr = [1, 2, 3, "a", "b"]
arr.append(44)
arr[3] = 4
print(arr)
for i in arr:
print(i, end='')
print()
dic = {
"tram": "tran thi bich tram",
"thang": "le tan thang",
"age": -100.1,
"money": 1.1,
}
print("The one name %s at the age %i has the money of %f" %
(dic["thang"], dic["age"], dic["money"]))
# print(dic)
for key in dic:
print("%s->%s" % (key, dic[key]))
for key, value in dic.items():
print("%s->%s" % (key, value))