【发布时间】:2020-03-03 22:55:54
【问题描述】:
免责声明 我是 python 新手 我需要拆分字符串输入发送 if 到一个函数,该函数用不同的字符(如替换密码)替换字符串中的字符,但我只是不知道该怎么做
print('Welcome to the encryption protocol for top secret governemt cover ups')
string=input('whats your message?')
def encrypt(string):
alpha = "abcdefghijklmnopqrstuvwyz"
sub_alpha = "pokmenliuytrwqazxcvsdfgbhn"
index=0
while index < len(string):
letter=string[index]
我不太确定我在 python 方面做得不好,这让我难倒了 3 天,现在我查看了我的课程材料并尝试了 youtube 上的视频,我可能真的很愚蠢
【问题讨论】: