def merge_dicts(*dict_args):
"""
Given any number of dicts, shallow copy and merge into a new dict,
precedence goes to key value pairs in latter dicts.
"""
result = {}
for dictionary in dict_args:
result.update(dictionary)
return result
z = merge_dicts(a, b, c, d, e, f, g)
with open('aa.txt', 'r') as file:
data = file.readlines()
for i,n in enumerate(data):
print(data[i][-2])
if data[i][-2] == '9':
data[i] = 'a\n'
print(data)
with open('aa.txt', 'w') as file:
file.writelines( data )
def sum(a,b):
return a+b
Access to external internet sites
from your code e.g. urllib or wget
out.ix[3 - 1, 3 - 1]