Skip to content

Commit eeec0f5

Browse files
committed
Update basic_operation.py
1 parent 0e1f0ca commit eeec0f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

General/basic_operation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import socket
2+
import os
23

34
#Remove Duplicates from list - Input (ipaddress)1 | Output (status)1
45
def validate_ip_logic(ip_address):
@@ -25,6 +26,11 @@ def validate_ip(ip_address):
2526
status=False
2627
return status
2728

29+
#Set all the dictonary value to some string - Input (input_dict,string) | Output (output_dict)1
30+
def set_all_dict_value(input_dict,value):
31+
result_dict = dict.fromkeys( input_dict, value )
32+
return result_dict
33+
2834
#Remove Duplicates from list - Input (list)1 | Output (list)1
2935
def remove_duplicate_list(input_list):
3036
output_list = list(set(input_list))

0 commit comments

Comments
 (0)