请求此题python代码的求解。(1)

输入一个大学的英文全称(大小写均可),输出大学的英文缩写简称(要求大写)。一般英文缩写是大学全称各个单词的首字母,但是缩写不包括of和and。

输入格式:

输入一个大学的英文全称,单词直接使用空格分隔。

输出格式:

输出的大写的英文简称。

输入样例1:

在这里给出一组输入。例如:

Massachusetts Institute of Technology

输出样例1:

在这里给出相应的输出。例如:

MIT

输入样例2:

在这里给出一组输入。例如:

zhejiang university of science and technology

输出样例2:

在这里给出相应的输出。例如:

ZUST
a = "zhejiang university of science and technology"
arr = a.split()
arr.remove("of")
if "and" in arr:
    arr.remove("and")
if "of" in arr:
    arr.remove("of")
res = ""
for i in arr:
    res += i[0].upper()
print(res)

如果有用,望采纳