-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsession5.py
More file actions
39 lines (32 loc) · 868 Bytes
/
Copy pathsession5.py
File metadata and controls
39 lines (32 loc) · 868 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
"""
orders_data = [(101,10000),(102,20000),(103,130000),(104,40000),(105,50000)]
print(orders_data[1])
orders_dict = dict(orders_data)
print(orders_dict)
print(orders_dict[101])
order_keys = orders_dict.keys()
print(order_keys)
order_values = orders_dict.values()
print(order_values)
order_items = orders_dict.items()
print(order_items)
print(len(order_items)) """
""" cus_raw_data = "custid", "custname"
"1" , "Bagath"
"2" , "Viveka"
cus_raw_data = custid, custname
1,Bagath
2,Viveka
print(cus_raw_data)
cust_header = cus_raw_data.split("\n")[0]
print(cust_header) """
cust_dict = {}
cust_header = """custid, custname"""
print(cust_header)
cust_data = """1,Bagath
2,Viveka"""
print(cust_data)
for item in cust_data:
print(item[0])
# cust_dict[item.split(',')[0] = tuple(item.split(',')[1])]
#print(cust_dict)