0

Is there any way in python to fill in the fields of a form (first name, last name) by taking them randomly from 2 pre-filled lists (name list and surname list)? And instead automatically randomise, without taking data from a list, the selection of the date of birth by keeping it over a certain range (e.g. 19 to 32 years)?

Thanks in advance for the help.

1 Answers1

0

Try using choice function from random module.

from random import choice
names = ['a','b','c']
random_name = choice(names) # use this for getting random names and surnames

for selecting a random date from a range, you can look at this post Generate a random date between two other dates

devrraj
  • 312
  • 2
  • 7