Aug-18-2019, 06:48 PM
I get that now but that leeds to my other issue is my code counting how many time a user name is used.
So I am thinking that my print statement should look like this with the exception that i need 2 keys or values 1 being the name the other number of attempts but I cant call for the number of attempts because I think it is not counting
(Aug-18-2019, 06:44 PM)ndc85430 Wrote: First, you're printing theformat
method, not calling it. When you do call it, it takes multiple arguments, in the same order as the placeholders, e.g.
>>> "{} {} {}".format("foo", "bar", "baz") 'foo bar baz' >>>Also,key
will be assigned the values of the keys in the dict, so the expressionkey["name"]
doesn't make any sense.
So I am thinking that my print statement should look like this with the exception that i need 2 keys or values 1 being the name the other number of attempts but I cant call for the number of attempts because I think it is not counting
for key in intruder_log: print("Attackers tried {} times to log in as {}".format("name"))# i need to add my second {}