I have an issue with my code. I made a list where i have cities and their postcodes listed. The script is supposed to be a web automation that randomly chooses a city and its postcode. It has to enter the city in one input field and postcode in another one. My code looks like this and the problem is that it chooses city randomly, but it doesn't select postcode in other field, instead it chooses another random city.
from webbot import Browser
import random
d = {'Presov':'08001', 'Zilina':'01001', 'Nove Zamky':'94062'}
web.type((random.choice(list(d))) , into='City')
web.type('Netherlands' , into='State, Province, or Region')
web.type((random.choice(list(d))) , into='Postal Code')
d.list(d)only gives you key. Uselist(d.items()).