I have about 50 urls named url1.....url50 I want to make a dictionary of these variables for example:
url1 = "https://example1.com"
url2 = "https://example2.com"
url3 = "https://example3.com"
. . I tried this::
all_urls = {}
a= 'url'
for i in range(1,51):
all_urls[a+str(i)] = a+str(i)
For this I get the keys right but how can I get variables as the value.
Output:
{'url1': 'url1',
'url10': 'url10',
'url11': 'url11',
'url12': 'url12',
'url13': 'url13',
'url14': 'url14',
'url2': 'url2',
'url3': 'url3',
'url4': 'url4',
'url5': 'url5',
'url6': 'url6',
'url7': 'url7',
'url8': 'url8',
'url9': 'url9'
Desired output:
'url1' : 'https://example.com'
'url2' : 'https://example.org'
'url3' : 'https://example.com'
and so on..