s = input('请输入一个字符:')
 if 'a' <= s <= 'z':
     print(chr(ord(s) - 32))
 elif 'A' <= s <= 'Z':
     print(chr(ord(s) + 32))
 else:
   print('s')

 

相关文章:

  • 2021-06-05
  • 2021-05-25
  • 2021-04-03
  • 2021-11-08
  • 2021-12-02
  • 2022-12-23
猜你喜欢
  • 2022-01-16
  • 2021-07-29
  • 2022-03-10
  • 2021-11-01
  • 2021-09-24
  • 2021-06-18
  • 2021-11-27
相关资源
相似解决方案