adding all files done so far
This commit is contained in:
17
temp/test.py
Normal file
17
temp/test.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
replace_chars = ['[', ']', '\'', ',']
|
||||
list_of_ips = ['list-items-in-here']
|
||||
new_list = []
|
||||
|
||||
|
||||
def split_ips(list):
|
||||
for sub_list in list:
|
||||
for ip in sub_list.split():
|
||||
for i in range(len(replace_chars)):
|
||||
ip = ip.replace(replace_chars[i], '')
|
||||
new_list.append(ip)
|
||||
|
||||
|
||||
split_ips(list_of_ips)
|
||||
|
||||
Reference in New Issue
Block a user