본문 바로가기
프로그래밍 문제/[Python] CheckIO

[CheckIO/Scientific Expedition] Pangram

by UltraLowTemp-Physics 2024. 3. 24.

1. Problem: https://py.checkio.org/en/mission/pangram/
2. My solution

python
접기
def check_pangram(text):
'''
is the given text is a pangram.
'''
# your code here
List = []
pangram = ""
for character in list(text.lower()):
if ord(character) < 123 and ord(character) > 96:
List.append(character)
for char in sorted(set(List)):
pangram +=char
if pangram == "abcdefghijklmnopqrstuvwxyz":
return True
else: return False

 

댓글