def text_to_binary(text):
binary_result = ""
for char in text:
binary_char = bin(ord(char))[2:].zfill(8) # Convert character to binary and pad with zeros
binary_result += binary_char
return binary_result
input_text = "Python"
binary_text = text_to_binary(input_text)
print(f"متن '{input_text}' به صورت باینری: {binary_text}")