Great for maintaining the index in the loop, as "for i in somelist: " does not maintain the index
items = ['dog','fog', 'jump', 'joma']
for i, item in enumerate(items):
print(i, item)
0 dog
1 fog
2 jump
3 joma
Enumurate is a great alternative vs the for loop below which doesn't look as pretty as enumerate
for i in range(len(items)):
print(i, item[i])
tags {
createddate = "${var.created_date}"
editeddate = "${timestamp()}"
createdby = "${var.created_by}"
environment = "${var.environment}"
}
ultravalue = 5
insaneultravalue = ultravalue
""" Both will now point to same point in memory"""
insaneultravalue = 20
""" 5 in memory will still be there since ultravalue is referring to it."""
ultravalue = 9
""" 5 in memory is now handled by the garbage collector. Nothing is pointing to it in memory since ultravalue points to 9 now."""
dict_a = dict_b = dict_c = {}
dict_c['hello'] = 'goodbye'
print(dict_a)
print(dict_b)
print(dict_c)
Would print:
{'hello': 'goodbye'}
{'hello': 'goodbye'}
{'hello': 'goodbye'}
...
az network route-table create \
--resource-group <Resource Group> \
--location <Location> \
--name <Name>
resource "azurerm_route_table" "<resource_name>" {
name = <name>
location = <location>
resource_group_name = "${azurerm_resource_group.<resource_name>.name}"
}