quotes?
Array or list
list, sorry
print(*your_list)
This looks easy
ahah, but it's working))
sorry, you don't really need the sep=' ' part
Ik ik So cool
I need. With sep i havn't gaps in output thank you!
hm, strange
so yeah, i think ''.join(generated_password) would be more logical for you
I will read about it, but now I did it with ".append"
show me the code where you generate the password
charlist = ['a','b','c','0','1','2','3','4','5','6','7','8','9'] l = [] for i in range(int(sys.argv[2])): for i in range(int(sys.argv[1])): l.append(random.choice(charlist)) i+=1 print(*l, sep='') l=[]
Output: 7c02563b 38890592 9910c423
there are string.ascii_lowercase and string.digits
oh, thank you! I wrote: charlist = string.ascii_letters + string.digits It's working better!
What about other symbols, like ";{})"...
there is string.punctuation
also you may define the l var inside a loop so you don't have to clear it every time
I did it + string.punctuation. The code is now simpler and cleaner and the output is what I need. Thank you!!
i'd do something like this, and format the code to follow pep8 yeah, and change the pass to something different, since it's a reserved name
Hello Jonathan! Do you know how to generate a password from a template?
What do you mean by a template?
When generating the password, I need to specify which characters should be in the password. And set them as a key, as I did with the quantity. For example: python test.py 8 2 \d{3}\A\a\ (At least three digits, 1 uppercase and 1 lowercase letter) Where "d" are numbers from 0 to 9, "A" are uppercase letters, and "a" are lowercase letters. My code: https://del.dog/aduxygnobi
I'd make a dict where the keys would be, well, your keys, e. g. \d and values - string objects
DM me and I'll explain in details
literal
5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9 Can anyone crack the code?
rules properly before doing anything, please don't PM anyone asking why you were muted! This group is English-only, send !ol to the bot for other choices different languages. • Learn Python 📖 📚 some resources, so avoid asking for any Python PDFs/Videos please. • How to ask questions properly. • Rules for this chat. • Offtopic chat • Advanced Python Talk Asking for [homework|exams] [solutions|cheats] are ban-able! #pin #pinned #pinnedmessage
list : str += i return str a = input"write word : " b = input"write simvol : " printjoina,b I want to join a and b, why not?
, how do o read the json file ?
Set? if x in List if x in Dict if x in Set
a=2 b=2 c=-1 d = b**2 - 4*a*c x1=-b + d**1/2/2*a x2=-b - d**1/2/2*a printd, x1, x2
csv files?? https://del.dog/arefeafuly i tried to declare the inputs as BINARY and STR, but even way i get the same error "TypeError: a bytes-like object is required, not 'str'"