def swap_quotes(s: str) -> str: dict = { '"':"'", "'":'"' } return ''.join(dict.get(c, c) for c in s) print(swap_quotes(input()))
получает строку и заменяет " на ' и наоборот
получает строку и заменяет ' на " и наоборот
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!