AttributeError: 'list' object has no attribute 'sample'
stackoverflow.com › questions › 65175611Dec 07, 2020 · For example user set min_number: 2 and max_number: 6. Random give me [3, 5] and this error. random = random.sample (range (1, 80), min_number) AttributeError: 'list' object has no attribute 'sample'. 'list' object has no attribute 'sample'. while min_number <= max_number: random = random.sample (range (1, 10), min_number) print (random) for j in random: element = wait.until (EC.element_to_be_clickable ( (By.XPATH, f'//* [@id="app"]/div/div [3]/div/div [1]/div [ {j}]/div'))) element.click () ...
AttributeError: ‘list’ object has no attribute ‘sample’ – Ask ...
askpythonquestions.com › 2020/12/07 › attributeerrorDec 07, 2020 · December 7, 2020 python, python-3.x, random. I ask user to enter min_number and max_number. For example user set min_number: 2 and max_number: 6. Random give me [3, 5] and this error. random = random.sample (range (1, 80), min_number) AttributeError: ‘list’ object has no attribute ‘sample’. ‘list’ object has no attribute ‘sample’. while min_number <= max_number: random = random.sample (range (1, 10), min_number) print (random) for j in random: element = wait.until (EC.element ...