It is used to match a pattern and extract data. For example, capture “Tweedle” in the string “Tweedle Bettle and Kettle”. import re text_from_router = 'vrf definition POLICE' pattern = r'vrf\s+definition\s+(?P<vrf_name>\S+)' match = re.search(pattern,text_from_router) if match: print(match.groupdict()) # prints {'vrf_name': 'POLICE'} \s-->whitespace,\S+-->any character,(?P<name>)-->Create a named capturing group Okay, it is...
[Read More]
Network Automation using Python
Paramiko
~~~
#!/usr/bin/env python
import time
import paramiko
[Read More]
python array
Staic and dynamic arrays. If we have 8bytes a number, the list [1,2,3] would take up 24 memory space. If its static, the memory would never change. Get would be O(1). So is changing the value of the array. Init and traverse would be O(8N),but we would not need 8...
[Read More]
A complete report on the security of cloud
Introdcution
[Read More]
Python For Data Science
Data Manipulation for Pandas
DataFrames are essentially multidimensional arrays with attached row and column labels and sometimes infamous missing data.
[Read More]