Skip to content

Tag: python-3.x

Building a password generator

I have recently built a password generator but wanted to include an aspect where if the user types in a letter instead of a number when defining the length of the password and number of passwords then the output would be to loop back in. If not the password generator would continue if numbers were inputted. T…

Extract parameters from variable length python f-string

Using Python 3.6 I have an f-string in main that looks like used in the following function call send_mail(title, message, to, from) I am not allowed to change the function call. The question is, inside send_email can I extract the folder, and host variables from the f-string? I would normally try something li…

Python array as a counter

I’m a Python 3.0 beginner and I’m struggling to find a solution to the following problem. It’s a step for a Galton Board simulation exercise. I have an numpy array, which length is auto generated based on another variable I am then generating a set of numbers, adding them to a list and summi…