PYTHON_WITH_MOHAMMAD Telegram 51
اسکریپت تولید پسورد قوی در پایتون
import random
import string

def generate_password(length=12):
chars = string.ascii_letters + string.digits + string.punctuation
return ''.join(random.choice(chars) for _ in range(length))

print("Password:", generate_password())


- ایمپورت کردن کتابخانه های string و random
- ترکیب حروف، اعداد و کاراکترهای خاص
- استفاده از `random.choice()` برای تولید پسورد تصادفی

@python_with_mohammad
👍1



tgoop.com/python_with_mohammad/51
Create:
Last Update:

اسکریپت تولید پسورد قوی در پایتون

import random
import string

def generate_password(length=12):
chars = string.ascii_letters + string.digits + string.punctuation
return ''.join(random.choice(chars) for _ in range(length))

print("Password:", generate_password())


- ایمپورت کردن کتابخانه های string و random
- ترکیب حروف، اعداد و کاراکترهای خاص
- استفاده از `random.choice()` برای تولید پسورد تصادفی

@python_with_mohammad

BY آموزش پایتون و برنامه نویسی




Share with your friend now:
tgoop.com/python_with_mohammad/51

View MORE
Open in Telegram


Telegram News

Date: |

How to Create a Private or Public Channel on Telegram? Invite up to 200 users from your contacts to join your channel Joined by Telegram's representative in Brazil, Alan Campos, Perekopsky noted the platform was unable to cater to some of the TSE requests due to the company's operational setup. But Perekopsky added that these requests could be studied for future implementation. The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously. Select “New Channel”
from us


Telegram آموزش پایتون و برنامه نویسی
FROM American