인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

이진규's profile image
이진규

asked

Free Python Tutorial (Basic) - Become a Developer in 6 Hours

List

퀴즈에서 응용을 스스로 해보고 싶은데 막힙니다.

Written on

·

171

1

for j in range(10) :
    import string
    import random
    _len = 6
    string_pool = string.ascii_lowercase
    result = ""
    for i in range(_len) :
        result += random.choice(string_pool)
    url = "http/" + result + ".com"
    my_str = url.replace("http/""")
    my_str = my_str[:my_str.index(".")]
    password = my_str[:3] + str(my_str.count("a")) + str(my_str.count("e")) + "!"
    c = password

    print(c)
이렇게 랜덤사이트를 만들어서 랜덤 비밀번호를 여러번
생성할 수 있게 해봤는데, 저는 여기서 자동으로 출력된
결과에서 e가 몇개가 들어갔는지 코딩하고 싶습니다.
10개든 100개든 생성된 비밀번호를 따로 리스트화 해서
분석하는 것이 아닌 결과가 보여지자 마자 분석까지 하는
방법을 알려주실 수 있을까요?
python

Answer

This question is waiting for answers
Be the first to answer!
이진규's profile image
이진규

asked

Ask a question