modify strings in python dictionary

I have a dictionary of device IDs (as a key) and addresses (as values).

What I am trying to do is flag address that are an IP address and modify the string to include a ‘:47808’ to the original IP address string. For example an IP address like this '10.200.200.26' modify to '10.200.200.26:47808'

These types of addresses like this 11:11 are twisted pair rs-485 devices that can be left alone.

data = {
    
    5242: '10.200.200.202', 
    5237: '10.200.200.191', 
    5233: '10.200.200.194', 
    5235: '10.200.200.193', 
    5241: '10.200.200.201', 
    5240: '10.200.200.200', 
    5239: '10.200.200.198', 
    5231: '10.200.200.196', 
    5232: '10.200.200.195', 
    5238: '10.200.200.190', 
    5236: '10.200.200.192', 
    5230: '10.200.200.197', 
    5234: '10.200.200.199', 
    10000: '10.200.200.26', 
    1100: '10.200.200.27', 
    1002: '10.200.200.32', 
    4: '11:4', 
    73005: '11:5',
     6: '11:6',
     7: '11:7',
     8: '11:8',
     22: '12:22',
     9: '11:9',
     23: '12:23',
     10: '11:10',
     24: '12:24',
     11: '11:11',
     25: '12:25',
     12: '11:12',
     12026: '12:26',
     27: '12:27',
     13: '11:13',
     12028: '12:28',
     14: '11:14',
     29: '12:29',
     30: '12:30',
     15: '11:15',
     31: '12:31',
     16: '11:16',
     12032: '12:32',
     12033: '12:33',
     73017: '11:17',
     34: '12:34',
     73018: '11:18',
     12035: '12:35',
     19: '11:19',
     36: '12:36',
     20: '11:20',
     21: '11:21',
     37: '11:37',
     38: '11:38',
     39: '11:39'
}

Can someone give me a tip on how to do this? I am trying the .find to flag : character as Boolean check that would only be in the type of address that can be left alone.

def isIPadress(stringVal):
    return stringVal.find(':')

for device,address in data.items():
    print(isIPadress(address))

Any tips greatly appreciated.

Answer

something like this
note that IP address checking is very simple but works for this data set.

data = {
    5242: '10.200.200.202',
    5237: '10.200.200.191',
    5233: '10.200.200.194',
    5235: '10.200.200.193',
    5241: '10.200.200.201',
    5240: '10.200.200.200',
    5239: '10.200.200.198',
    5231: '10.200.200.196',
    5232: '10.200.200.195',
    5238: '10.200.200.190',
    5236: '10.200.200.192',
    5230: '10.200.200.197',
    5234: '10.200.200.199',
    10000: '10.200.200.26',
    1100: '10.200.200.27',
    1002: '10.200.200.32',
    4: '11:4',
    73005: '11:5',
    6: '11:6',
    7: '11:7',
    8: '11:8',
    22: '12:22',
    9: '11:9',
    23: '12:23',
    10: '11:10',
    24: '12:24',
    11: '11:11',
    25: '12:25',
    12: '11:12',
    12026: '12:26',
    27: '12:27',
    13: '11:13',
    12028: '12:28',
    14: '11:14',
    29: '12:29',
    30: '12:30',
    15: '11:15',
    31: '12:31',
    16: '11:16',
    12032: '12:32',
    12033: '12:33',
    73017: '11:17',
    34: '12:34',
    73018: '11:18',
    12035: '12:35',
    19: '11:19',
    36: '12:36',
    20: '11:20',
    21: '11:21',
    37: '11:37',
    38: '11:38',
    39: '11:39'
}
with_port = {}
for k,v in data.items():
    if v.count('.') == 3:
        with_port[k] = f'{v}:47808'
    else:
        with_port[k] = v
for k,v in with_port.items():
    print(f'{k} -->  {v}')

output

5242 -->  10.200.200.202:47808
5237 -->  10.200.200.191:47808
5233 -->  10.200.200.194:47808
5235 -->  10.200.200.193:47808
5241 -->  10.200.200.201:47808
5240 -->  10.200.200.200:47808
5239 -->  10.200.200.198:47808
5231 -->  10.200.200.196:47808
5232 -->  10.200.200.195:47808
5238 -->  10.200.200.190:47808
5236 -->  10.200.200.192:47808
5230 -->  10.200.200.197:47808
5234 -->  10.200.200.199:47808
10000 -->  10.200.200.26:47808
1100 -->  10.200.200.27:47808
1002 -->  10.200.200.32:47808
4 -->  11:4
73005 -->  11:5
6 -->  11:6
7 -->  11:7
8 -->  11:8
22 -->  12:22
9 -->  11:9
23 -->  12:23
10 -->  11:10
24 -->  12:24
11 -->  11:11
25 -->  12:25
12 -->  11:12
12026 -->  12:26
27 -->  12:27
13 -->  11:13
12028 -->  12:28
14 -->  11:14
29 -->  12:29
30 -->  12:30
15 -->  11:15
31 -->  12:31
16 -->  11:16
12032 -->  12:32
12033 -->  12:33
73017 -->  11:17
34 -->  12:34
73018 -->  11:18
12035 -->  12:35
19 -->  11:19
36 -->  12:36
20 -->  11:20
21 -->  11:21
37 -->  11:37
38 -->  11:38
39 -->  11:39