(input)
| 1 | def parse_infix(input): |
| 2 | ret = "" |
| 3 | for i, tmp in enumerate(input): |
| 4 | if tmp == '.': |
| 5 | ret += tmp |
| 6 | elif tmp.isdigit(): |
| 7 | ret += tmp |
| 8 | if i < len(input) - 1: |
| 9 | if not input[i + 1].isdigit() and input[i + 1] != '.': |
| 10 | ret += " " |
| 11 | else: |
| 12 | ret += tmp + " " |
| 13 | return ret |
| 14 | |
| 15 | |
| 16 | def convert_to_postfix(infix): |